您的位置:首页 > 编程语言 > MATLAB

MATLAB 3D 动画制作(三)- 实时随动3D动画设计

2013-01-14 05:08 856 查看

MATLAB 3D 动画制作(三)- 实时随动3D动画设计

 MATLAB 3D Animation -- Real-time 3D Animation Design
 Author: Sonictl Northeastern University. 

前言:本教程将逐步完成一个有趣的MATLAB 3D实时随动动画, 本篇将使用串口数据实时控制动画中的物体的运动。“MATLAB 3D 动画制作(三)- 实时随动3D动画设计” 是 “MATLAB 3D 动画制作(二)- 3D 动画动作设计” 的进阶篇。 本篇将使用串口数据实时控制动画中的物体的运动。

Introduction: This series of tutorials are going to discuss a process of making 3D animation using MATLAB step by step. The 3D animation in MATLAB can let the engineers exhibit their work. It can be used widely, especially at the fields of Virtual Reality,
Control system Designing, Human-machine interactivity, Computer Vision, etc.

首先介绍一下本教程的最终效果:

http://v.youku.com/v_show/id_XNTAxNzUwNjgw.html



Below is the final effect of this 3D animation.

http://www.youtube.com/watch?v=nPKcR_xSIpY

Section 3: Real-time 3D Animation Design (实时随动3D动画设计)

要完成本实例,请先学习:


三轴力传感器数据在MATLAB中实时显示

MATLAB 3D 动画制作(一)- 3D 图形设计

In this section, We are going to discuss the approach to build the 3D object in MATLAB figure window. We are going to begin with the simple object like sphere, bar, cylinder, torus.  And we also discuss make a more complicated 3D object by assembling these
simple 3D object together.

1.1 introduction to the Tools we are going to use:

surf function in MATLAB
cylinder function in MATLAB
sphere function in MATLAB

1.1.1 surf function in MATLAB

    surf(X,Y,Z) uses Z for
the color data and surface height. X and Y are
vectors or matrices defining thex and y components
of a surface. If X and Y are
vectors, length(X) = n and length(Y) = m,
where[m,n] = size(Z).
In this case, the vertices of the surface faces are (X(j),
Y(i), Z(i,j)) triples. To create X and Y matrices for arbitrary domains, use the meshgrid function.

    

1.1.2  cylinder function in MATLAB

1.1.3 sphere function in MATLAB

1.2 Creating the Coordinates for the pin we are going to use

1.2.1 sphere:

1.2.2 cylinder

1.2.3 bar

We can see the effect below:

1.2.4 torus

 

1.3 Generate the complicated 3-D object by assembling them together

1.3.1 Create the coordinates for the Inter Bars

1.3.3 Create the coordinates for the Outer Bars

Thank you!!

Reference:  http://www.mathworks.com/matlabcentral/fileexchange/28309

参考文档:经典教程---matlab三维图形的绘制  http://ishare.iask.sina.com.cn/f/35139508.html




                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  3DAnimation matlab