Spline curve by uniform subdivision

`spcrv(c,k) `

spcrv(c)

spcrv(c,k,maxpnt)

`spcrv(c,k) `

` `

provides
a dense sequence *f*(tt) of points on the uniform
B-spline curve *f* of order `k`

with
B-spline coefficients `c`

. Explicitly, this is the
curve

$$f:t|\to {\displaystyle \sum _{j=1}^{n}B(t-k/2|j,\mathrm{...},j+k)\text{}c(j),\text{}\frac{k}{2}\le t\le n+}\frac{k}{2}$$

with *B*(·|*a*,...,*z*)
the B-spline with knots *a*,...,*z*,
and `n`

the number of coefficients in `c`

,
i.e., `[d,n]`

equals `size(c)`

.

`spcrv(c) `

chooses the order `k`

to
be 4.

`spcrv(c,k,maxpnt) `

makes
sure that at least `maxpnt`

points are generated.
The default value for the maximum number of sites `tt`

to
be generated is `100`

.

The parameter interval that the site sequence `tt`

fills
out uniformly is the interval [`k`

/2 .. (`n-k`

/2)].

The output consists of the array *f*(tt).

The following would show a questionable broken line and its smoothed version:

points = [0 0 1 1 0 -1 -1 0 0 ; 0 0 0 1 2 1 0 -1 -2]; plot(points(1,:),points(2,:),':') values = spcrv(points,3); hold on, plot(values(1,:),values(2,:)), hold off

Was this topic helpful?