Difference between revisions of "AoPSWiki:Sandbox"
Aquadragon (talk | contribs) |
Aquadragon (talk | contribs) |
||
Line 2: | Line 2: | ||
<dd> | <dd> | ||
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
− | '''The Name Asymptote''' | + | <big>'''The Name Asymptote'''</big> |
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
− | + | * Why Asymptote is called Asymptote? | |
<blockquote>http://asymptote.sourceforge.net/FAQ/section1.html#whyasy | <blockquote>http://asymptote.sourceforge.net/FAQ/section1.html#whyasy | ||
Question 1.4. Why was the name Asymptote chosen? | 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... | + | Well, it isn't the perfect graphics package, but we do think it is getting there asymptotically... |
</blockquote> | </blockquote> | ||
− | + | </div></div> | |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
− | '''Tips''' | + | <big>'''Tips'''</big> |
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
− | |||
* To see the asymptote code of any diagram made with asymptote, click on the diagram and it will come up. | * 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. | * 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. | * 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. | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 25: | Line 24: | ||
<br> | <br> | ||
To start your asymptote diagram you have to include [asy] at the beginning, and [/asy] at the ending. | To start your asymptote diagram you have to include [asy] at the beginning, and [/asy] at the ending. | ||
− | < | + | <br></div></div> |
− | <div class="mw-collapsible mw-collapsed | + | <div class="mw-collapsible mw-collapsed"> |
'''#2 Setting points''' | '''#2 Setting points''' | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
Line 38: | Line 37: | ||
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. | 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. | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 49: | Line 48: | ||
pair A,B; | pair A,B; | ||
in your diagram to make it work. | in your diagram to make it work. | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 104: | Line 103: | ||
draw(A--B--cycle, dashed+red); | draw(A--B--cycle, dashed+red); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 148: | Line 147: | ||
label("$x$", midpoint(A--B), NE); | label("$x$", midpoint(A--B), NE); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 200: | Line 199: | ||
label(scale(.75)*"$90^\circ$", B, 2.5*dir(50)); | label(scale(.75)*"$90^\circ$", B, 2.5*dir(50)); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 216: | Line 215: | ||
''' A note ''' | ''' A note ''' | ||
Apparently a pair has an x property and a y property. I kind of discovered this it by testing. I think it might be documented somewhere. | Apparently a pair has an x property and a y property. I kind of discovered this it by testing. I think it might be documented somewhere. | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 239: | Line 238: | ||
label((string) b,a,S); | label((string) b,a,S); | ||
</code> | </code> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 265: | Line 264: | ||
draw(rightanglemark(A,B,C,1.5)); | draw(rightanglemark(A,B,C,1.5)); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 294: | Line 293: | ||
F = intersectionpoint(A -- B, C -- D); | F = intersectionpoint(A -- B, C -- D); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 388: | Line 387: | ||
Try out different colors to see which ones you prefer for your asymptote diagrams. | Try out different colors to see which ones you prefer for your asymptote diagrams. | ||
Have fun! | Have fun! | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 412: | Line 411: | ||
<code>dot(A);</code> | <code>dot(A);</code> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 452: | Line 451: | ||
draw(rightanglemark(A,B,C,1.5)); | draw(rightanglemark(A,B,C,1.5)); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 496: | Line 495: | ||
add(pathticks(A--B, 2, spacing=1, s=2)); | add(pathticks(A--B, 2, spacing=1, s=2)); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 517: | Line 516: | ||
draw(A--C, MidArrow(size=0.2cm)); | draw(A--C, MidArrow(size=0.2cm)); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 532: | Line 531: | ||
return (p.x,p.y + amount); | return (p.x,p.y + amount); | ||
}</code> | }</code> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 544: | Line 543: | ||
</code> | </code> | ||
rotate B <math>x</math> degrees around center A is where C is. | rotate B <math>x</math> degrees around center A is where C is. | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 593: | Line 592: | ||
dot(B); | dot(B); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 622: | Line 621: | ||
dot("A",A,SW*0.5); | dot("A",A,SW*0.5); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 649: | Line 648: | ||
</asy></code> | </asy></code> | ||
[/hide] | [/hide] | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 702: | Line 701: | ||
You have the extension <math>A, B,C,</math> and <math>I</math>, because you want it to go down from point <math>C</math>, through <math>I</math>, and end on <math>\overline{AB}</math>. | You have the extension <math>A, B,C,</math> and <math>I</math>, because you want it to go down from point <math>C</math>, through <math>I</math>, and end on <math>\overline{AB}</math>. | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 772: | Line 771: | ||
</asy> | </asy> | ||
</code> | </code> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 835: | Line 834: | ||
</asy> | </asy> | ||
</code> | </code> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 876: | Line 875: | ||
</asy> | </asy> | ||
</code> | </code> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 897: | Line 896: | ||
label("$60^\circ$",(0.1,0.1),E); | label("$60^\circ$",(0.1,0.1),E); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 968: | Line 967: | ||
label("$C$",C,SE); | label("$C$",C,SE); | ||
</asy>[/hide],then <math>A</math>=[hide][c](0,0);[/c][/hide],<math>B</math>=[hide][c]dir(c)*b;[/c][/hide],and <math>C</math>=[hide][c](a,0);[/c][/hide]. | </asy>[/hide],then <math>A</math>=[hide][c](0,0);[/c][/hide],<math>B</math>=[hide][c]dir(c)*b;[/c][/hide],and <math>C</math>=[hide][c](a,0);[/c][/hide]. | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 997: | Line 996: | ||
</asy> | </asy> | ||
</code> | </code> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 1,054: | Line 1,053: | ||
</asy>[/hide] | </asy>[/hide] | ||
The center is N and the radius is r/2. | The center is N and the radius is r/2. | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 1,086: | Line 1,085: | ||
label("$B$", A[2], S); | label("$B$", A[2], S); | ||
</code> | </code> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 1,107: | Line 1,106: | ||
dot(midpoint(A--B)); | dot(midpoint(A--B)); | ||
</asy> | </asy> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Line 1,150: | Line 1,149: | ||
</asy> | </asy> | ||
</code> | </code> | ||
− | < | + | <br></div></div> |
<div class="mw-collapsible mw-collapsed" style="width:100%"> | <div class="mw-collapsible mw-collapsed" style="width:100%"> | ||
Revision as of 15:48, 2 June 2022
Asymptote tutorial for AoPS
The Name Asymptote
Tips
#1 Beginning your code
#2 Setting points
#3 Pair part 1
#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