Copyright | (C) 2015 Dimitri Sabadie |
---|---|

License | BSD3 |

Maintainer | Dimitri Sabadie <dimitri.sabadie@gmail.com> |

Stability | experimental |

Portability | portable |

Safe Haskell | None |

Language | Haskell2010 |

This module defines `Spline`

s and related functions. Because a `Spline`

requires `Key`

s, the Data.Spline.Key module is also exported.

# Splines

A

is a collection of `Spline`

a s`Key`

s with associated interpolation
modes.

Given two `Key`

s which indices are *i* and *i+1*, the interpolation mode on
the resulting curve is performed using the interpolation mode of the key *i*.
Thus, the interpolation mode of the latest key might be ignored. There’s an
exception, though, when using the `Bezier`

interpolation mode. Feel free
to dig in the Key documentation.

# Building splines

spline :: Ord s => (a s -> s) -> [Key (a s)] -> Spline a s Source

Build a

.`Spline`

a s

`a s`

is the type held by `Key`

s. For instance,

.`V2`

Float

The first argument of the function, which has type `a s -> s`

, is a function
used to extract the sampling value of each `Key`

s. In most cases, that value
represents the time or the frame of a simulation. That value is used to
perform sampling comparison.

# Sampling splines

# Re-exported

module Data.Spline.Key