第10章-Maple的3D动画制作..doc
文本预览下载声明
Maple的3D动画
图10-01~07 “外层”动画animate3d的基本使用方法
with(plots):
animate3d((x^2*cos(t)+y^2*sin(t)),x=-2..2,y=-2..2,t=0..Pi,frames=9,axes=box,orientation=[63,76],style=wireframe,color=red,grid=[11,11]);
图 1 使用各版通用函数animate3d制作的单片曲面变形过程动画
with(plots):
animate3d({-2*cos(t)*sqrt(x^2+y^2),(x^2*cos(t)+y^2*sin(t))},x=-2..2,y=-2..2,t=0..Pi,frames=6,axes=box,orientation=[63,76],style=wireframe,color=blue,grid=[16,16]);
图 2 animate3d的多对象功能
with(plots):with(plottools):
animate3d([x*u,t-u,x*cos(t*u)+u],x=1..3,t=1..4,u=1..4,frames=9,style=wireframe,color=blue,axes=FRAME);
图 3 使用各版通用函数animate3d制作的参数曲面变形过程动画
with(plots):
animate3d({[x,y+t,x*y],[2*x*y+t,x,x+t]},x=-Pi..Pi, y=-2*Pi..2*Pi,t=1..12,frames=6,labels=[x,y,z],axes=frame,style=LINE,color=blue,grid=[6,8]);
图 4 animate3d生成的双对象参数曲面过程动画
笔者注记:对于参数曲面来说,动画生成命令函数animate3d()也可以接受坐标变换和transform变换。
proc(x,y,t) if x^2 y+t*3/4 then t-2 else t end if end proc:P:=%:
animate3d(P,-2..2,-3..3,1..5,axes=box,frames=9,style=PATCHNOGRID,orientation=[35,70],frames=9);
图 5 使用各版通用函数animate3d制作的proc曲面变形过程动画
笔者注记:其它的非曲面对象和其它的动画类型(如踪迹动画),本函数都不能实现,需要另辟蹊径。
观察单个函数曲面动画的数据结构
with(plots):
animate3d(u+t*cos(u*x),x=1..6.3,t=1..4,u=1..4,axes=box,frames=3,grid=[3,3]);Q:=%:
lprint(Q):;
图 6 简化了的单片曲面,用于观察数据结构
观察参数方程曲面动画的数据结构
with(plots):
animate3d([x+u,u+t,u+x*cos(u)],x=1..3,t=1..4,u=0..1*Pi,axes=frame,frames=3,grid=[3,4],orientation=[-36,112]);
q:=%:lprint(q):
图 7 简化了的参数曲面过程动画,用于观察数据结构
图10-08~24 “中层”动画dis-t的基本制作方法
观察实例
首先观察一个简单的dis-t动画的数据结构实例:
with(plots):with(plottools):
N:=3:
display(seq(line([0,0,0],[i*2*Pi/12,sin(i*2*Pi/12),3]),i=1..N),insequence=true,color=black,thickness=2,axes=frame,scaling=constrained);
lprint(%);
图 8 一条线段的过程动画
再来观察一个特殊的dis-t动画的数据结构实例:
with(plots):
plot3d(4,t=0..2*Pi,p=0..Pi,coords=spherical,numpoints=12):
Q2:=%:
polygonplot3d([[0,1,-6],[1,-1,2],[3,6,5] ,[1,-4,-18],[3,0,9]],axes=boxed,thickness=3,color=green):
Q3:=%:
spacecurve([t*sin(t),t,t*cos(t)],t=-P
显示全部