Circle Hell

Mark Carter cartermark46 at ukmail.com
Thu Sep 4 15:25:11 EDT 2003


> $xstart = (cos($current_arclength)*$radius+$xcenter) /10;
> $ystart = (sin($current_arclength)*$radius+$ycenter) /10;

I wouldn't be using lengths of arcs, if I were you. And that division
by 10 looks a bit odd, too.

Given a circle of radius r, if the arc stops at an angle theta to the
horizontal (measured anticlockwise from the east), then the point on
the circle is:
x = xcentre + r * cos(theta)
y = ycentre + r * sin(theta)

If you want to know the point at a distance 25 from the circle, simply
substitute (r + 25) in the formula above.




More information about the Python-list mailing list