A Bezier curve library for .NET Standard
Go to file
cosmonaut f1120a2572
continuous-integration/drone/push Build is passing Details
specify x64
2020-11-22 16:55:16 -08:00
Curve specify x64 2020-11-22 16:55:16 -08:00
Test remove Core namespace 2020-02-20 17:37:52 -08:00
.drone.yml switch to DroneCI 2020-02-20 17:44:19 -08:00
.gitignore initial commit 2019-10-25 00:56:28 -07:00
LICENSE include license in repo 2019-10-29 14:52:04 -07:00
MoonTools.Core.Curve.sln initial commit 2019-10-25 00:56:28 -07:00
README.md update README 2020-02-20 17:42:10 -08:00

README.md

MoonTools.Curve

NuGet Badge Build Status

Efficiently implements quadratic and cubic Bezier curves in 2D and 3D using immutable structs.

Example

    var myCurve = new CubicBezierCurve3D(
        new Vector3(-4, -4, -3),
        new Vector3(-2, 4, 0),
        new Vector3(2, -4, 3),
        new Vector3(4, 4, 0)
    );

    myCurve.Point(0.5f); // => Vector3(0, 0, 0.75f)
    myCurve.Point(3, 2, 4); // => Vector3(0, 0, 0.75f)
    myCurve.Velocity(0.5f); // => Vector3(9, 0, 4.5f)
    myCurve.Velocity(3, 2, 4); // => Vector3(9, 0, 4.5f)

    // curve values can be calculated statically as well
    CubicBezierCurve3D.Point(        
        new Vector3(-4, -4, -3),
        new Vector3(-2, 4, 0),
        new Vector3(2, -4, 3),
        new Vector3(4, 4, 0),
        0.5f
    ); // => Vector3(0, 0, 0.75f)