lights FAQ Forum github.com/luapower/path2d

2D Graphics
path2d
affine2d
box2d
clipper
cairo
freetype
openvg
svg_parser
hpdf

path2d_catmullrom

catmull-rom splines


local catmull = require'path2d_catmullrom'

Math for 2D Catmull-Rom splines defined as:

k, x1, y1, x2, y2, x3, y3, x4, y4

catmull.to_bezier3(k, x1, y1, x2, y2, x3, y3, x4, y4) -> x1, y1, x2, y2, x3, y3, x4, y4

Convert a catmull-rom segment to a cubic bezier curve.

catmull.point(t, k, x1, y1, x2, y2, x3, y3, x4, y4) -> x, y

Get the point at time t on a catmull-rom segment.


Last updated: 22 months ago | Edit on GitHub

Pkg type:Lua+ffi
Version: dev-30-gd1027f3
Last commit:
License: PD
Requires: eq  glue  pp  vararg  luajit 
Required by: sg  cplayer  winapi 

Top