Skip to main content

catmull

catmull() 

Draws a Catmull-Rom curve through a set of points.

catmull((0,0), (1,1), (2,-1), (3,0), tension: .4, stroke: blue)
catmull((0,0), (1,1), (2,-1), (3,0), tension: .5, stroke: red)

..pts-style:

Positional arguments should be coordinates that the curve should pass through. Named arguments are for styling.

close:

Default: false

Closes the curve with a straight line between the start and end of the curve.

Styling

Root: catmull

Supports marks.

tension:

Default: 0.5

How tight the curve should fit to the points. The higher the tension the less curvy the curve.

Anchors

Supports path anchors.

  • pt-n: The nth given position (0 indexed so "pt-0" is equal to "start")