Ohmnivore / com.not-unity.yuksel-splines

A fork of com.unity.splines that provides Cem Yuksel's class of C^2 interpolating splines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Possible Improvements

  • Rotation interpolation along the spline
  • Normals along the spline (WIP in yuksel-splines-normals branch)
  • 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

About

A fork of com.unity.splines that provides Cem Yuksel's class of C^2 interpolating splines.

License:Other


Languages

Language:C# 100.0%