AoPSWiki:Sandbox
Essential Reference for Using Asymptote in AoPS
A focused asymptote reference with examples and short code
Contents
[hide]Introduction
Why Asymptote is called Asymptote?
http://asymptote.sourceforge.net/FAQ/section1.html#whyasy
Question 1.4. Why was the name Asymptote chosen?
Well, it isn't the perfect graphics package, but we do think it is getting there asymptotically...
Tips
- To see the asymptote code of any diagram made with asymptote, click on the diagram and it will come up.
- If your code is not working check to make sure you have a semicolon after each line, no extra parentheses or brackets, and no open parentheses or brackets.
- Another thing to check if your code is not working, is to make sure every variable you've used in your code is in the pair.
Beginning your code
Setting points
A = (0,0);
Say you want to have point units to the right of point , then you can use
B = (4,0);
Setting points on your diagram is like setting points on a graph. The first number is the -coordinate of the point and the second number is the -coordinate of the point.
Note: You should not use E, S, N, or W as variables, instead you should use EE, SS, NN, and WW, but label them as E, S, N, W. This is because E, S, N, and W are used to indicate directions in asymptote.
Pair part 1
If you include variables in your diagram you have to have somewhere in your code.
Example: You have two points and , and you're drawing a line connecting them, you need to include
pair A,B;
in your diagram to make it work.
#4 Connecting two points, coloring the line
#5 Labeling, Midpoint
#6 Angle Measures
#7 Distance Function
#8 Casting
#9 Right Angle Mark
#10 Intersection
#11 Filling
#12 Dot
#13 Size
#14 Tick Marks
#15 Arrows
#16 Shifting Coordinates
#17 Rotating
#18 Circles
#19 Dashed Lines
#20 Angle Mark
Expand
#21 "for" Command
Expand
#22 Extension
Expand
#23 How to draw an equilateral triangle
Expand
#24 How to draw an isosceles triangle
Expand
#25 How to draw a scalene triangle
Expand
#26 Labeling Angles
Expand
#27 Drawing triangles using SSS, SAS, AAS, and ASA
Expand
#28 Arcs
Expand
#29 The Nine Point Circle
Expand
#30 Pair Part 2
Expand
#31 Finding the midpoint
Expand
#32 Foot Command
Expand
#33 Introduction to 3D Geometry