Unique Coding

General Splines Method

Overview

This project is a simple mathematical expression that allows the 'shape' of this spline curve to be swapped-out for other types.

It could be useful in multiple applications, such as SVG, CAD, video rendering and games.

It has two main versions:

  • Polynomial - for exact Bezier legacy support, or for producing exact Parabolas
  • Waveform - creates a shape with only a small difference to the Bezier, but additionally allows exact sine-wave, circular and looping representations
A main benefit of the waveform version is it can be shaped into an exact quarter-circle, then repeated infinitely with other transforms to produce repeating circular shapes.

What is a spline?

A spline is a math expression that has a start and an end with both having a position and direction. The most common form of spline in use today is the Bezier. However one of the most notable limitations is it's unable to produce an exact circular shape. It will also diverge to something not useful when drawing the result outside of the 0...1 range.

Examples

The new waveform spline allows many more circular-based curves to be generated: (especially if operating outside of the 0 to 1 input range)

Examples:

  • (left below) complex repeating orbit paths of a planet & moon, from a small number of interacting splines
  • (middle below) exact sine waves by iterating two positions representing a quarter-angle
  • (right below) a spiral by also decaying the radius of the circle over its input

How it works

Each 'shape' to apply to the math expression, is just any math function that conforms to a few simple constraints.

The applied shape affects only how the start and end points are interpolated.

To support or become a potential consumer of this find, contact: flightphysics@protonmail.com