About
May 21, 2023 · View on GitHub

About
Based on com.unity.splines version 2.2.1.
The original package provides linear, cubic Bézier, and Catmull-Rom splines. They are not C^2-continuous.
This fork provides Cem Yuksel's class of C^2 interpolating splines. Only the quadratic Bézier and circular interpolators are implemented at the moment.
Note
Only Yuksel splines are supported in this package. Support of the other types from the original package was removed to simplify implementation. This package can be installed side by side with the original.
Spline normals and rotations haven't been implemented, only position and derivatives.
Installation
- Install the package from its git URL or from a local copy.
- It doesn't depend on the
com.unity.splinespackage and won't conflict if it's present
Possible Improvements
- Rotation interpolation along the spline
- Normals along the spline (WIP in
yuksel-splines-normalsbranch) - Implement elliptical and hybrid interpolators
- Shared interfaces with
com.unity.splines - Shader utility functions have not been reimplemented for Yuksel splines
- Automated tests have not been reimplemented for Yuksel splines
- Yuksel splines and other types of splines co-existing in one package
Changes
BezierKnot
This class hasn't been renamed to minimize changes relative the original package. It is however a Yuksel curve control point now with no concept of tangent points or rotation.
BezierCurve
This class hasn't been renamed to minimize changes relative to the original package. It is however a Yuksel curve now:
- Stores two interpolating curves and the parameters of the middle interpolating point
- Trigonometric blend between the two interpolator curves
- When a transformation matrix should be applied to the curve, the control points are pre-multiplied for caching