Cubic Curve Segment
by, 03-06-2012 at 08:49 PM (487 Views)
CubicCurve2D class used to implement the shape interface. In x,y coordinates space, cubic parametric curve segment is presented by this class. In float & double precision, a cubic curve is specified by using these methods.
Curve setting methods are same for the CubicCurve2D and QuadraticCurve class, except 2nd control point.E.g.
Java Code:// create new CubicCurve2D.Double CubicCurve2D c = new CubicCurve2D.Double(); // draw CubicCurve2D.Double with set coordinates c.setCurve(x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2); g2.draw(c);