matlab 贝塞尔曲线,matlab实现贝塞尔曲线绘图pdf查看

贝塞尔曲线绘图方法:

%Program 3.7 Freehand Draw Program Using Bezier Splines

%Click in Matlab figure window to locate first point, and click

% three more times to specify 2 control points and the next

% spline point. Continue with groups of 3 points to add more

% to the curve. Press return to terminate program.

%% This fuction is different from the text book written by the editor of the book.

%% Apart from the original functions, Dr. Wang has added its own codes to the function

%% in order to 1) move the entire graph to positive; 2)

function modifiedbezierdraw

clear all;

close all

clc

plot([0 2],[1,1],'k',[1 1],[0 2],'k');hold on %% Modified to move the entire graph to positive.

%imshow('1588.jpg');hold on

t=0:.02:1;

xlist=[]; ylist=[]; %% Used to store the coordinate list.

[x,y]=ginput(1); % get one mouse click

xlist(1)=x; ylist(1)=y; %% Starting coordinate

while(0 == 0)

[xnew,ynew] = ginput(3); % get three mouse clicks

if length(xnew) < 3

break % if return pressed, terminate

end

xlist(length(xlist)+1:length(xlist)+3)=xnew; ylist(length(ylist)+1:length(ylist)+3)=ynew; %%

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值