Example #1
0
        public static (double X, double Y, double Z) BezierSextic(double t, double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, double dX, double dY, double dZ, double eX, double eY, double eZ, double fX, double fY, double fZ, double gX, double gY, double gZ)
        {
            var abcdef = InterpolateBezierQuintic3DTests.BezierQuintic(t, aX, aY, aZ, bX, bY, bZ, cX, cY, cZ, dX, dY, dZ, eX, eY, eZ, fX, fY, fZ);
            var bcdefg = InterpolateBezierQuintic3DTests.BezierQuintic(t, bX, bY, bZ, cX, cY, cZ, dX, dY, dZ, eX, eY, eZ, fX, fY, fZ, gX, gY, gZ);

            return(InterpolateLinear3DTests.LinearInterpolate3D(t, abcdef.X, abcdef.Y, abcdef.Z, bcdefg.X, bcdefg.Y, bcdefg.Z));
        }
        public static (double X, double Y, double Z) BezierQuintic(double t, double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, double dX, double dY, double dZ, double eX, double eY, double eZ, double fX, double fY, double fZ)
        {
            var abcde = InterpolateBezierQuartic3DTests.QuarticBezierInterpolateGetPoint(t, aX, aY, aZ, bX, bY, bZ, cX, cY, cZ, dX, dY, dZ, eX, eY, eZ);
            var bcdef = InterpolateBezierQuartic3DTests.QuarticBezierInterpolateGetPoint(t, bX, bY, bZ, cX, cY, cZ, dX, dY, dZ, eX, eY, eZ, fX, fY, fZ);

            return(InterpolateLinear3DTests.LinearInterpolate3D(t, abcde.X, abcde.Y, abcde.Z, bcdef.X, bcdef.Y, bcdef.Z));
        }
        public static (double X, double Y, double Z) QuadraticBezierInterpolate3D1(double t, double x0, double y0, double z0, double x1, double y1, double z1, double x2, double y2, double z2)
        {
            // point between a and b
            var ab = InterpolateLinear3DTests.LinearInterpolate3D(t, x0, y0, z0, x1, y1, z1);

            // point between b and c
            var bc = InterpolateLinear3DTests.LinearInterpolate3D(t, x1, y1, z1, x2, y2, z2);

            // point on the bezier-curve
            return(InterpolateLinear3DTests.LinearInterpolate3D(t, ab.X, ab.Y, ab.Z, bc.X, bc.Y, bc.Z));
        }