The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Points on a quadratic curve

Posted by Malice on July 25, 2001 at 4:02 AM

Is it at all possible to get a series of points on
quadratic and for the matter cubic line using graphics2D.

I've got a line

QuadCurve2D q = new QuadCurve2D.Float();
q.setCurve( startX, startY,controlX,controlY,
endX, endY);

I need to find a series of points on this line. The maths
is simple enough using a liner drawline() (ie y=mx+c) but
how can I find points on a quadratic without a fromula.
I want to be able to maniplulate the curve and animate a
picture along the path it defines.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us