Difference between revisions of "Asymptote: Marking Angles"
(Created page with 'You can use the olympiad package to create nice marks for the angles. Let's look at this angle. <pre><nowiki> draw((0,0)--(3,4),EndArrow); draw((0,0)--(5,0),EndArrow); </nowiki…') |
m |
||
Line 1: | Line 1: | ||
+ | {{Asymptote}} | ||
+ | |||
You can use the olympiad package to create nice marks for the angles. | You can use the olympiad package to create nice marks for the angles. | ||
Revision as of 18:51, 4 January 2010
You can use the olympiad package to create nice marks for the angles.
Let's look at this angle.
draw((0,0)--(3,4),EndArrow); draw((0,0)--(5,0),EndArrow);
Now we mark this angle:
import olympiad; draw((0,0)--(3,4),EndArrow); draw((0,0)--(5,0),EndArrow); draw(anglemark((5,0),(0,0),(3,4)));
(The import olympiad code is not required on the forums, but you need to use it on your home computer).
This angle is too small, so we change the scale factor:
import olympiad; draw((0,0)--(3,4),EndArrow); draw((0,0)--(5,0),EndArrow); markscalefactor=0.1; draw(anglemark((5,0),(0,0),(3,4)));
We can add properties to this:
import olympiad; draw((0,0)--(3,4),EndArrow); draw((0,0)--(5,0),EndArrow); markscalefactor=0.1; draw(anglemark((5,0),(0,0),(3,4)),red);
We can get fancy with this:
import olympiad; draw((0,0)--(3,4),EndArrow); draw((0,0)--(5,0),EndArrow); markscalefactor=0.1; filldraw(anglemark((5,0),(0,0),(3,4)),green,red+linewidth(1));