• Advertisement

Archived

This topic is now archived and is closed to further replies.

drawing arcs

This topic is 5992 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, does anyone know, how to draw an arc, when having only the starting point, the center and the endpoint? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
you may use the formula y=k*x*x , and force the equation
to be solved by trhee points, then iteratively choose the leftmost partion until you reach a fixed value that stands for the granularity of the same curve, then recurse the rightmost part , remember to put a wedge in the recursion formula, that''s to say the fixed value that stops the recursion code.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If I understand the problem, are we dealing with three points in
space ? if so then why not take a vector from the start point to
the centre point (p) and a vector from the end point to the centre (q) create a tangent at the start point orthogonal to
p ( ie. the dot product is 0 ) and similarly create a tangent
at the end point, and then use a Hermite spline to connect the
two points ( a reasonable textbook will give Hermite''s ). It is
possible to calculate a Hermite iteratively, by 9 additions per point. This solution will allow you to use the end point to
connect to another point in the same way smoothly.


Share this post


Link to post
Share on other sites
Isn''t there a less advanced method? Or maybe you could tell me a site, where I could find info on this subject.

Share this post


Link to post
Share on other sites
are the 3 points in 2d space?
if so... why not match a circle to them... and draw a sector... ie:

(x-a)^2+(y-b)^2=r^2.

you must solve this for a,b,r (the x,y centre, and the radius).
ie

(x0-a)^2+(y0-b)^2=r^2;
(x1-a)^2+(y1-b)^2=r^2;
(x2-a)^2+(y2-b)^2=r^2;

expand all 3 and solve simulataneously (or look it up)...
then draw a sector of a circle.

Share this post


Link to post
Share on other sites

  • Advertisement