matlab cscvn,“Natural” or periodic interpolating cubic spline curve

cscvn

“Natural” or periodic interpolating cubic spline curve

Syntax

curve = cscvn(points)

Description

curve = cscvn(points) returns

a parametric variational, or natural, cubic spline curve (in ppform) passing

through the given sequence points(:j), j =

1:end. The parameter value t(j)

for the jth point is chosen by Eugene Lee's [1] centripetal scheme,

i.e., as accumulated square root of chord length:

∑i

If the first and last point coincide (and there are no other

repeated points), then a periodic cubic spline curve is constructed. However, double

points result in corners.

Examples

The following provides the plot of a questionable curve through

some points (marked as circles):

points=[0 1 1 0 -1 -1 0 0; 0 0 1 2 1 0 -1 -2];

fnplt(cscvn(points)); hold on,

plot(points(1,:),points(2,:),'o'), hold off

Here is a closed curve, good for 14 February, with one double

point:

c=fnplt(cscvn([0 .82 .92 0 0 -.92 -.82 0; .66 .9 0 ...

-.83 -.83 0 .9 .66])); fill(c(1,:),c(2,:),'r'), axis equal

Algorithms

The break sequence t is determined as

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

and csape (with either periodic or variational

end conditions) is used 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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值