public static void Hermite(this PathWriter pw, double[] xyCoords) { Curve4Points curve4_points = pw._c4_points; pw.MoveTo(xyCoords[0], xyCoords[1]); for (int i = 0; i < xyCoords.Length - (4 * 2);) { Curves.HermiteToBezier( xyCoords[i], xyCoords[i + 1], xyCoords[i + 2], xyCoords[i + 3], xyCoords[i + 4], xyCoords[i + 5], xyCoords[i + 6], xyCoords[i + 7], curve4_points ); pw.Curve4(curve4_points.x1, curve4_points.y1, curve4_points.x2, curve4_points.y2, curve4_points.x3, curve4_points.y3 ); i += 2; } }
public static void CatmulRom(this PathWriter pw, double[] xyCoords) { Curve4Points curve4_points = pw._c4_points; pw.MoveTo(xyCoords[2], xyCoords[3]);//*** for (int i = 0; i < xyCoords.Length - (4 * 2);) { Curves.CatromToBezier( xyCoords[i], xyCoords[i + 1], xyCoords[i + 2], xyCoords[i + 3], xyCoords[i + 4], xyCoords[i + 5], xyCoords[i + 6], xyCoords[i + 7], pw._c4_points ); pw.Curve4(curve4_points.x1, curve4_points.y1, curve4_points.x2, curve4_points.y2, curve4_points.x3, curve4_points.y3 ); i += 2; } }
public static Curve4Points UbSplineToBezier(Curve4Points cp) { return(UbSplineToBezier(cp[0], cp[1], cp[2], cp[3], cp[4], cp[5], cp[6], cp[7])); }
public static Curve4Points CatromToBezier(Curve4Points cp) { return(CatromToBezier(cp[0], cp[1], cp[2], cp[3], cp[4], cp[5], cp[6], cp[7])); }
public static Curve4Points HermiteToBezier(Curve4Points cp) { return(HermiteToBezier(cp[0], cp[1], cp[2], cp[3], cp[4], cp[5], cp[6], cp[7])); }