public Object clone() { return new Cubic(new Point2D.Double(p1.x, p1.y), new Point2D.Double(p2.x, p2.y), new Point2D.Double(p3.x, p3.y), new Point2D.Double(p4.x, p4.y)); }
public Segment reverse() { return new Cubic(new Point2D.Double(p4.x, p4.y), new Point2D.Double(p3.x, p3.y), new Point2D.Double(p2.x, p2.y), new Point2D.Double(p1.x, p1.y)); }
public Object clone() { return new Cubic(new Point2D.Double(p1.x, p1.y), new Point2D.Double(p2.x, p2.y), new Point2D.Double(p3.x, p3.y), new Point2D.Double(p4.x, p4.y)); }
public Segment reverse() { return new Cubic(new Point2D.Double(p4.x, p4.y), new Point2D.Double(p3.x, p3.y), new Point2D.Double(p2.x, p2.y), new Point2D.Double(p1.x, p1.y)); }
public Object clone() { return new Cubic(new Point2D.Double(p1.x, p1.y), new Point2D.Double(p2.x, p2.y), new Point2D.Double(p3.x, p3.y), new Point2D.Double(p4.x, p4.y)); }
public Segment reverse() { return new Cubic(new Point2D.Double(p4.x, p4.y), new Point2D.Double(p3.x, p3.y), new Point2D.Double(p2.x, p2.y), new Point2D.Double(p1.x, p1.y)); }
public Segment getSegment(double t0, double t1) { double dt = t1-t0; Point2D.Double np1 = eval(t0); Point2D.Double dp1 = evalDt(t0); Point2D.Double np2 = new Point2D.Double(np1.x+dt*dp1.x/3, np1.y+dt*dp1.y/3); Point2D.Double np4 = eval(t1); Point2D.Double dp4 = evalDt(t1); Point2D.Double np3 = new Point2D.Double(np4.x-dt*dp4.x/3, np4.y-dt*dp4.y/3); return new Cubic(np1, np2, np3, np4); }
public Segment getSegment(double t0, double t1) { double dt = t1-t0; Point2D.Double np1 = eval(t0); Point2D.Double dp1 = evalDt(t0); Point2D.Double np2 = new Point2D.Double(np1.x+dt*dp1.x/3, np1.y+dt*dp1.y/3); Point2D.Double np4 = eval(t1); Point2D.Double dp4 = evalDt(t1); Point2D.Double np3 = new Point2D.Double(np4.x-dt*dp4.x/3, np4.y-dt*dp4.y/3); return new Cubic(np1, np2, np3, np4); }
public Segment getSegment(double t0, double t1) { double dt = t1-t0; Point2D.Double np1 = eval(t0); Point2D.Double dp1 = evalDt(t0); Point2D.Double np2 = new Point2D.Double(np1.x+dt*dp1.x/3, np1.y+dt*dp1.y/3); Point2D.Double np4 = eval(t1); Point2D.Double dp4 = evalDt(t1); Point2D.Double np3 = new Point2D.Double(np4.x-dt*dp4.x/3, np4.y-dt*dp4.y/3); return new Cubic(np1, np2, np3, np4); }
Point2D.Double p1 = new Point2D.Double(pts[2], pts[3] ); Point2D.Double p2 = new Point2D.Double(pts[4], pts[5] ); segments.add(new Cubic(loc, p0, p1, p2)); loc = p2;
return (hullLen+cordLen)/2; Cubic c = new Cubic(); double npX = (p1.x+3*(p2.x+p3.x)+p4.x)*0.125; double npY = (p1.y+3*(p2.y+p3.y)+p4.y)*0.125;
return (hullLen+cordLen)/2; Cubic c = new Cubic(); double npX = (p1.x+3*(p2.x+p3.x)+p4.x)*0.125; double npY = (p1.y+3*(p2.y+p3.y)+p4.y)*0.125;
Point2D.Double p1 = new Point2D.Double(pts[2], pts[3] ); Point2D.Double p2 = new Point2D.Double(pts[4], pts[5] ); segments.add(new Cubic(loc, p0, p1, p2)); loc = p2;
Point2D.Double p1 = new Point2D.Double(pts[2], pts[3] ); Point2D.Double p2 = new Point2D.Double(pts[4], pts[5] ); segments.add(new Cubic(loc, p0, p1, p2)); loc = p2;
return (hullLen+cordLen)/2; Cubic c = new Cubic(); double npX = (p1.x+3*(p2.x+p3.x)+p4.x)*0.125; double npY = (p1.y+3*(p2.y+p3.y)+p4.y)*0.125;
keySplineCubics[i] = new Cubic(0, 0, keySplines[i * 4], keySplines[i * 4 + 1],
keySplineCubics[i] = new Cubic(0, 0, keySplines[i * 4], keySplines[i * 4 + 1],
keySplineCubics[i] = new Cubic(0, 0, keySplines[i * 4], keySplines[i * 4 + 1],