Difference between revisions of "Asymptote: How to"

(Drawing)
(Examples with walkthrough steps)
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{Asymptote}}
 
{{Asymptote}}
=Filling=
+
=Additional Asymptote Learning=
As explained above, you can create closed objects such as:
 
  
<tt>draw(origin--(5,0)--(3,4)--cycle);</tt>
+
==Basics==
 +
[[Asymptote: Drawing|Drawing]]
  
<asy>
+
[[Asymptote: Filling|Filling]]
draw(origin--(5,0)--(3,4)--cycle);
 
</asy>
 
  
Now introducing the [b]fill()[/b] command. You would fill this triangle with green by the following:
+
[[Asymptote: Labeling|Labeling]]
  
<tt>fill(origin--(5,0)--(3,4)--cycle, green);</tt>
+
[[Asymptote: Marking Angles|Marking Angles]]
  
<asy>
+
[[Asymptote: Asymptote in the Aops Wiki|Using Asymptote on Aops Wiki]]
fill(origin--(5,0)--(3,4)--cycle, green);
 
</asy>
 
  
Note how there is no outline. To create an outline and fill, without making two different statements, use the '''filldraw()''' command. Like the order of filldraw, you put the color of the fill before the draw.
+
==Intermediate==
 +
[[Asymptote: Graphing|Graphing]]
  
<tt>filldraw(origin--(5,0)--(3,4)--cycle, green, red+linewidth(1));</tt>
+
[[Asymptote: Olympiad Package Part 1|Olympiad Package Basics]]
  
<asy>
+
==Advanced==
filldraw(origin--(5,0)--(3,4)--cycle, green, red+linewidth(1));
 
</asy>
 

Revision as of 19:51, 14 December 2019