# splines
An implementation of popular parametric splines for use in graphics, simulations, and games.
[](https://hex.pm/packages/splines)
[](https://hexdocs.pm/splines/)
```sh
gleam add splines
```
```gleam
import splines
import vec/vec2.{Vec2}
pub fn main() -> Nil {
let bezier = splines.bezier_2d([
Vec2(0.0, 1.0),
Vec2(0.0, 0.5),
Vec2(0.5, 0.0),
Vec2(1.0, 0.0),
])
splines.sample(bezier, 0.5) |> echo
}
```
Further documentation can be found at <https://hexdocs.pm/splines>.