Your preferences have been saved!
» A class that models a Cubic-Bezier curve - import java.io.Serializable; import javax.vecmath.Vector3d; /**  * a class that models a Cubic-Bezier curve  * @author Adam Levi, Marina Skarbovsky  */ public class CubicBezierCurve implements Serializable {   private static final long serialVersionUID = -5219859720055898005L;   private Vector3d[] P;... 05 Feb 12 » Interpolates given points by a bezier curve - import java.awt.Point; import java.awt.geom.Point2D; /**  * Interpolates given points by a bezier curve. The first  * and the last two points are interpolated by a quadratic  * bezier curve; the other points by a cubic bezier curve.  *   * Let p a list of given points and b the calculated bezier points,  * then one get the whole curve by:  * ... 05 Feb 12 » Spline 2D - import java.awt.geom.Point2D; import java.util.Arrays; /**  * Interpolates points given in the 2D plane. The resulting spline  * is a function s: R -> R^2 with parameter t in [0,1].  *   * @author krueger  */ public class Spline2D {   /** ... 05 Feb 12 » A spline factory instance - public class SplineFactory {   /**    * Create a Bezier spline based on the given control points.    * The generated curve starts in the first control point and ends    * in the last control point.    *     * @param controlPoints  Control points of spline (x0,y0,z0,x1,y1,z1,...).    * @param nParts         Number of parts to divide each leg into.    * @return               Spline (x0,y0,z0,x1,y1,z1,...).... 05 Feb 12 » Curve with QuadCurve2D - import java.awt.Canvas; import java.awt.Color; import java.awt.Container; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.QuadCurve2D; import java.awt.geom.Rectangle2D; import java.util.Vector; import javax.swing.JApplet; import javax.swing.JFrame;... 05 Feb 12 » Draw curve with mouse - import java.awt.BasicStroke; import java.awt.BorderLayout; import java.awt.Canvas; import java.awt.Color; import java.awt.Container; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.GridLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent;... 05 Feb 12 » Move the curve control point and redraw the curve - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.MouseEvent; import java.awt.geom.CubicCurve2D; import java.awt.geom.Ellipse2D; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.geom.QuadCurve2D;... 05 Feb 12