资源简介
在Matlab GUI中实现了Bezier任意阶数曲线和曲面的绘制。曲线可使用鼠标生成控制点,控制点可随意拖动;也可手动输入控制点坐标。曲面控制点信息可使用xls文件导入,也可手动输入控制点坐标。
程序使用Matlab GUI编写。
文件清单:
===========必需文件============
----bezier_test.m、bezier_test.fig:bezier曲线绘制主页面程序(主程序入口)
----bezier_surface.m、bezier_surface.fig:bezier曲线绘制页面程序
----bezier_DeCas.m、bezier_DeCas.fig:De_Casteljau算法显示页面程序
----my_bezier.m:bezier曲线/曲面生成子函数
----my_Curve_De_Casteljau.m:曲线De_Casteljau算法子函数
----my_Surface_De_Casteljau.m:曲面De_Casteljau算法子函数
----at.xls:绘制“@”图案用到的控制点坐标信息文件
============非必需文件===========
----bezier_surface_control_points:实例文件,曲面控制点信息文件。导入此文件,可绘制Bezier曲面。

代码片段和文件信息
function varargout = bezier_DeCas(varargin)
% BEZIER_DECAS MATLAB code for bezier_DeCas.fig
% BEZIER_DECAS by itself creates a new BEZIER_DECAS or raises the existing
% singleton*.
%
% H = BEZIER_DECAS returns the handle to a new BEZIER_DECAS or the handle to
% the existing singleton*.
%
% BEZIER_DECAS(‘CALLBACK‘hobjecteventDatahandles...) calls the local
% function named CALLBACK in BEZIER_DECAS.M with the given input arguments.
%
% BEZIER_DECAS(‘Property‘‘Value‘...) creates a new BEZIER_DECAS or raises the
% existing singleton*. Starting from the left property value pairs are
% applied to the GUI before bezier_DeCas_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to bezier_DeCas_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE‘s Tools menu. Choose “GUI allows only one
% instance to run (singleton)“.
%
% See also: GUIDE GUIDATA GUIHANDLES
% Edit the above text to modify the response to help bezier_DeCas
% Last Modified by GUIDE v2.5 11-May-2014 15:19:04
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @bezier_DeCas_OpeningFcn ...
‘gui_OutputFcn‘ @bezier_DeCas_OutputFcn ...
‘gui_LayoutFcn‘ [] ...
‘gui_Callback‘ []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State varargin{:});
else
gui_mainfcn(gui_State varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before bezier_DeCas is made visible.
function bezier_DeCas_OpeningFcn(hobject eventdata handles varargin)
% This function has no output args see OutputFcn.
% hobject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to bezier_DeCas (see VARARGIN)
handles.column_name_list={‘原始控制点‘ ‘第1次插值‘ ‘第2次插值‘ ‘第3次插值‘ ‘第4次插值‘‘第5次插值‘...
‘第6次插值‘ ‘第7次插值‘ ‘第8次插值‘ ‘第9次插值‘‘第10次插值‘...
‘第11次插值‘ ‘第12次插值‘ ‘第13次插值‘ ‘第14次插值‘‘第15次插值‘};
handles.row_name_list={‘P0‘‘P1‘‘P2‘‘P3‘‘P4‘‘P5‘‘P6‘‘P7‘‘P8‘‘P9‘‘P10‘‘P11‘‘P12‘‘P13‘‘P14‘‘P15‘};
set(handles.CtrlPtNum_edit‘String‘4);
set(handles.DeCas_uitable‘ColumnEditable‘ [true false false false false]);
set(handles.DeCas_uitable2‘ColumnEditable‘ [true false false false false]);
data=cell(55);
for j=2:5
for i=(7-j):5
data{ij}=‘----------‘;
end
end
set(handles.DeCas_uitable‘Data‘ data);
set(handles.DeCas_uitable‘ColumnName‘ {‘原始控制点‘ ‘第1次插值‘ ‘第2次插值‘
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 22528 2014-05-10 20:04 程序源代码\at.xls
文件 5784 2014-05-12 11:57 程序源代码\bezier_DeCas.fig
文件 12767 2014-05-12 11:57 程序源代码\bezier_DeCas.m
文件 7479 2014-05-11 17:21 程序源代码\bezier_surface.fig
文件 12514 2014-05-11 17:21 程序源代码\bezier_surface.m
文件 17408 2014-05-09 20:38 程序源代码\bezier_surface_control_points.xls
文件 10792 2014-05-13 00:02 程序源代码\bezier_test.fig
文件 23090 2014-05-13 00:20 程序源代码\bezier_test.m
文件 737 2014-05-09 13:49 程序源代码\my_bezier.m
文件 393 2014-05-09 12:35 程序源代码\my_Curve_De_Casteljau.m
文件 557 2014-05-09 12:50 程序源代码\my_Surface_De_Casteljau.m
文件 651 2014-08-14 15:50 Bezier程序清单.txt
文件 33881 2014-08-14 15:49 Bezier程序使用说明.docx
目录 0 2014-05-13 01:39 程序源代码
----------- --------- ---------- ----- ----
148581 14
- 上一篇:matlab车型识别demo
- 下一篇:基于matlab的直接序列扩频通信系统仿真
相关资源
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
- k近邻算法matlab实现
评论
共有 条评论