Difference between revisions of "Asymptote: How to"

(Drawing)
(Basics)
 
(20 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.
+
[https://youtu.be/ruAiHB05hoY AoPS Asymptote Quick Start Video]
  
<tt>filldraw(origin--(5,0)--(3,4)--cycle, green, red+linewidth(1));</tt>
+
==Intermediate==
 +
[[Asymptote: Graphing|Graphing]]
  
<asy>
+
[[Asymptote: Olympiad Package Part 1|Olympiad Package Basics]]
filldraw(origin--(5,0)--(3,4)--cycle, green, red+linewidth(1));
+
 
</asy>
+
==Advanced==

Latest revision as of 16:41, 14 August 2022