# cscvn

“Natural” or periodic interpolating cubic spline curve

## Syntax

## Description

returns a parametric variational, or `curve`

= cscvn(`points`

) *natural,* cubic spline
curve (in ppform) passing through the given sequence points
(:*j*), *j* = 1:end. The parameter value
*t*(*j*) for the *j*-th
point follows the Eugene Lee's [1] centripetal scheme, as accumulated square root of chord length:

$$\sum _{i<j}\sqrt{\Vert \text{points}(:,i+1)-\text{points}(:,i)\Vert {}_{2}}$$

If the first and last point coincide and there are no other repeated points) then the function constructs a periodic cubic spline curve. However, double points result in corners.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

The function determines the break sequence `t`

as

t = cumsum([0;((diff(points.').^2)*ones(d,1)).^(1/4)]).';

and uses `csape`

(with either periodic or variational end
conditions) to construct the smooth pieces between double points (if any).

## References

[1] E. T. Y. Lee. “Choosing nodes in parametric curve
interpolation.” *Computer-Aided Design* 21 (1989),
363–370.

## Version History

**Introduced in R2006b**