AoPSWiki
Looking for a challenging geometry text? Preparing for MATHCOUNTS or the AMC exams? Check out Art of Problem Solving's Introduction to Geometry by Richard Rusczyk.

Asymptote: Useful functions

From AoPSWiki

Revision as of 15:47, 8 February 2009 by Jcbowman (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Asymptote (Vector Graphics Language)
Getting Started - Basics - Reference - Examples - How to - Macros and Packages - Advanced Asymptote - Help

Useful functions - CSE5 Package


Intersection points

pair[] intersectionpoints(path, path);

Example:

size(8cm,0);
import math;
import graph;
real r,s;
pair a,b, common;
path circ1, circ2;
r=1; s=1;
a=(0,0);
b=(1,0);
circ1=circle(a,r);
circ2=circle(b,s);
draw(circ1,linewidth(1bp));
draw(circ2,1bp+green);
pair [] x=intersectionpoints(circ1, circ2);
dot(x[0],3bp+blue);
dot(x[1],3bp+blue);
draw(x[0] -- x[1],1bp+red);

size(200,200);import math;import graph;real r,s;pair a,b, common;path circ1, circ2;r=1; s=1;a=(0,0);b=(1,0);circ1=circle(a,r)...


Next: CSE5

Want to learn how to tackle those tough AMC/AIME/Olympiad counting and probability problems? Check out Art of Problem Solving's Intermediate Counting & Probability by David Patrick.
© Copyright 2008 AoPS Incorporated. All Rights Reserved. • FoundationPrivacyContact Us