Skip to content

Instantly share code, notes, and snippets.

@takehiko
Created August 9, 2023 13:24
Show Gist options
  • Select an option

  • Save takehiko/e485d0d57db8a45c2c1b7ea1b56d5f24 to your computer and use it in GitHub Desktop.

Select an option

Save takehiko/e485d0d57db8a45c2c1b7ea1b56d5f24 to your computer and use it in GitHub Desktop.
Creating angles using a set square
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" width="550" height="400" id="setsquare2">
<style type="text/css" >
<![CDATA[
.ssq1 { fill:#99f; fill-opacity:0.8; stroke:black; stroke-width:2; stroke-linejoin:round; }
.ssq2 { fill:#f99; fill-opacity:0.8; stroke:black; stroke-width:2; stroke-linejoin:round; }
.ang { fill:none; stroke:gold; stroke-width:2; stroke-linecap:round; }
#bg { fill:#f0fff0; stroke:none }
text { font-size:10px; font-family:Serif; font-style:normal; font-weight:normal; fill:black; stroke:none; }
]]>
</style>
<rect x="0" y="0" width="550" height="400" id="bg"/>
<!-- 2つの三角定規を配置して,(200,50)に105°を作る -->
<g transform="translate(500,223.205) scale(-3,3) rotate(0)">
<polygon points="0,0 100,0 100,-57.735" class="ssq1"/>
</g>
<g transform="translate(200,50) scale(-3,3) rotate(90)">
<polygon points="0,0 100,0 50,-50" class="ssq2"/>
</g>
<!-- 角の大きさを表す円弧の半径は10(の3倍) -->
<g transform="translate(200,50) scale(3,3) rotate(0)">
<path d="M -7.071,7.071 A10,10 0,0,0 8.66,5" class="ang"/>
<text x="2" y="0">105°</text>
</g>
</svg>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@takehiko
Copy link
Author

takehiko commented Aug 9, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment