Asymptote: Example 1

Revision as of 00:58, 7 January 2010 by Dojo (talk | contribs) (Created page with '<pre><nowiki> size(200); import olympiad; //definitions pair A=origin, B=(4,0), C=(4,2), D=(0,2), E=(2,2); path p1=(A--C); path p2=(E--B); //draw draw(A--B--C--D--cycle)…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
size(200); 
import olympiad; 

//definitions 
pair A=origin, B=(4,0), C=(4,2), D=(0,2), E=(2,2); 
path p1=(A--C); 
path p2=(E--B); 

//draw 
draw(A--B--C--D--cycle); 
draw(p1); 
draw(p2); 
dot((A)); 
dot((B)); 
dot((C)); 
dot((D)); 
dot((E)); 
dot((IP(p1,p2))); 

//label 
label("A",A,SW); 
label("B",B,SE); 
label("C",C,NE); 
label("D",D,NW); 
label("E",E,N); 
label("F", IP(p1,p2),S);

[asy] size(200);  import olympiad;   //definitions  pair A=origin, B=(4,0), C=(4,2), D=(0,2), E=(2,2);  path p1=(A--C);  path p2=(E--B);   //draw  draw(A--B--C--D--cycle);  draw(p1);  draw(p2);  dot((A));  dot((B));  dot((C));  dot((D));  dot((E));  dot((IP(p1,p2)));   //label  label("A",A,SW);  label("B",B,SE);  label("C",C,NE);  label("D",D,NW);  label("E",E,N);  label("F", IP(p1,p2),S); [/asy]

For definitions, see Olympiad Package Part 1: Value Setting.

For drawing, see Drawing.

For labeling, see Labeling.