⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bezier.m

📁 Bezier Curve, I haven t yet opened. I got it from a friend
💻 M
字号:
function bezier(n)% function bezier(n)%% Plots the Bezier-curve of n control-points.% The control points can be chosen by clicking% with the mouse on the figure.%% COMMAND:  bezier(n)% INPUT:    n  Number of Control-Points%% Date:     2007-11-15% Author:   Stefan H黣berclose all;nplot = 100;figure(1);hold on; box on;set(gca,'Fontsize',16);title('Choose 1 st control points');t = linspace(0,1,nplot);	for i = 1:n		title(['Choose ',num2str(i),' th. control point']);	p(i,:) = ginput(1);	hold off;	plot(p(:,1),p(:,2),'k-','LineWidth',2);	axis([0 1 0 1]);	hold on; box on;	[X,Y,p_bez] = CASTELJAU(0,1,p,t);	plot(p_bez(:,1),p_bez(:,2),'b-','LineWidth',4);	plot(p(:,1),p(:,2),'ro','MarkerSize',10,'MarkerFaceColor','r');endtitle(['Bezier-curve with ',num2str(n),' control points']);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -