[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: pcb GL can't render stretched arcs



I am using the polar form of the ellipse given at:

http://en.wikipedia.org/wiki/Ellipse#Polar_form_relative_to_center

with theta the angle of the point we are checking. (Those cos
and sin calculations are easy, just delta-x/len and delta-y/len.)
With that I can calculate the distance from the point to an
ellipse.

Restricting this to an ellipse /segment/ is tricky, since as DJ
pointed out, these are not "real" elliptical arcs, but stretched
arcs, so the limiting angles do not correspond directly to actual
angles.

Adding explicit checks for distance from endpoints would give
us an almost-correct solution.

There are still pathologies I can think of with arcs whose
thickness (or thickness + search radius) is greater than the
minor axis, though..

-- 
Andrew Poelstra
Email: asp11 at sfu.ca OR apoelstra at wpsoftware.net
Web:   http://www.wpsoftware.net/andrew/



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user