point
float x
float y
circle
point center
float radius
point intersect (circle ca, circle cb, point pn)
returns intersection between ca and cb that is not pn
float distance (point pa, point pb)
returns distance between points pa and pb
point pointoncircle (circle c, float angle)
returns a point on the circle going the given angle clockwise from the top
input:
circle c0
c0.center = variable
c0.radius = variable
float a1
a1 = variable
float a2
a2 = variable
output:
point pf
process:
point p1
p1 = pointoncircle(c0,a1)
point p2
p2 = pointoncircle(c0,a2)
circle c1
c1.center = p1
c1.radius = distance(p1,p2)
circle c2
c2.center = p2
c2.radius = distance(p1,p2)
circle c3
c3.center = intersect(c0,c1,p2)
c3.radius = distance(p1,p3)
circle c4
c4.center = intersect(c2,c3,p1)
c4.radius = distance(intersect(c2,c3,p1),p1)
circle c5
c5.center = intersect(c4,c3,p1)
c5.radius = distance(intersect(c4,c3,p1),p1)
circle c6
c6.center = intersect(c2,c4,p1)
c6.radius = distance(intersect(c2,c4,,p1),p1)
pf = intersect(c5,c6,p1)