Module hexasphere::interpolation[][src]

Functions

geometric_slerp

Implements spherical interpolation along the great arc created by the initial points. This returns a new point p percent of the way along that arc.

geometric_slerp_half

This is an optimization for the geometric_slerp in the case where p is 0.5 or 50%.

geometric_slerp_multiple

This is an optimization for the case where multiple points require the calculation of varying values of p for the same start and end points.

lerp

Simple linear interpolation. No weirdness here.

lerp_half

Gives the average of the two points.

lerp_multiple

This is provided as a plug in for people who need it, but this implements essentially the same algorithm as BaseShape would without ever being reimplemented.

normalized_lerp

Performs normalized linear interpolation. This creates distortion when compared with spherical interpolation along an arc, however this is most likely faster, as though this avoids expensive sin and acos calculations.

normalized_lerp_half

This is an optimization of normalized_lerp which avoids a multiplication.

normalized_lerp_multiple

This is provided as a plug in for people who need it, but this implements essentially the same algorithm as BaseShape would without ever being reimplemented.