注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

徐小湛的博客

高等数学课件、函数图形动画、数学软件应用

 
 
 

日志

 
 

用Maple画投影的图形  

2011-08-22 20:23:56|  分类: Maple作图 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Maple可以用投影命令 project 将空间图形(曲面、立体、空间曲线)投影到指定的平面上。

投影的基本格式是:
project(P, [A, B, C]) 它将图形 P 投影到三点 A, B, C 所确定的平面上。 

 

 

投影到坐标面或平行于坐标面的平面

 

 
用Maple画投影的图形 - calculus - 高等数学

 

 

   输入以下命令:

 

with(plots):with(plottools):

qumian:=plot3d([u*sin(theta), u*cos(theta), u^2+1],

u=-.5..1.5, theta=0..2*Pi, style=patch):

A:=[0,0,0]: B:=[1,0,0]: C:=[0,1,0]:

touying:=project(qumian, [A, B, C]):

display(qumian, touying, orientation=[40,70],lightmodel=light2,axes=boxed);

 

输出图形:

 

 用Maple画投影的图形 - calculus - 高等数学

 

 

 用Maple画投影的图形 - calculus - 高等数学

 

    输入以下命令:< xmlnamespace prefix ="o" ns ="urn:schemas-microsoft-com:office:office" />

 

with(plots): with(plottools):

qumian:=plot3d([u*sin(theta), u*cos(theta), u^2+1],u=-.5..1.5, theta=0..2*Pi, style=patch):

A:=[1,-3,0]: B:=[0,-3,0]: C:=[0,-3,1]:

touying:=project(qumian, [A, B, C]):

display(qumian, touying, orientation=[40,70], lightmodel=light2, axes=boxed, scaling=constrained);

 

输出图形:

 

用Maple画投影的图形 - calculus - 高等数学

 

 用Maple画投影的图形 - calculus - 高等数学

 

   输入以下命令:

 

with(plots):with(plottools):

qumian:=plot3d([u*sin(theta), u*cos(theta), u^2+1], u=-.5..1.5, theta=0..2*Pi, style=patch):

A:=[-3,1,0]: B:=[-3,0,0]: C:=[-3,0,1]:

touying:=project(qumian, [A, B, C]):

display(qumian, touying, orientation=[40,70], lightmodel=light2, axes=boxed, scaling=constrained);

 

输出图形:

 

用Maple画投影的图形 - calculus - 高等数学

  

用Maple画投影的图形 - calculus - 高等数学

  

   输入以下命令:

with(plots):with(plottools):

qumian:=plot3d([u*sin(theta), u*cos(theta), u^2+1], u=-.5..1.5, theta=0..2*Pi, style=patch):

A1:=[0,0,0]: B1:=[1,0,0]: C1:=[0,1,0]:

A2:=[-3,1,0]: B2:=[-3,0,0]: C2:=[-3,0,1]:

A3:=[1,-3,0]: B3:=[0,-3,0]: C3:=[0,-3,1]:

touying1:=project(qumian, [A1, B1, C1]):

touying2:=project(qumian, [A2, B2, C2]):

touying3:=project(qumian, [A3, B3, C3]):

display(qumian, touying1,touying2,touying3, orientation=[40,70], lightmodel=light2, axes=boxed, scaling=constrained);

 

输出图形:

 

用Maple画投影的图形 - calculus - 高等数学用Maple画投影的图形 - calculus - 高等数学

 

 

  

用Maple画投影的图形 - calculus - 高等数学

 

   输入以下命令:

with(plots):with(plottools):

qumian:=plot3d([u*sin(theta), u*cos(theta), u^2+1], u=1..2, theta=0..2*Pi, style=patch):

A1:=[0,0,0]: B1:=[1,0,0]: C1:=[0,1,0]:

A2:=[-6,1,0]: B2:=[-6,0,0]: C2:=[-6,0,1]:

A3:=[1,-6,0]: B3:=[0,-6,0]: C3:=[0,-6,1]:

touying1:=project(qumian, [A1, B1, C1]):

touying2:=project(qumian, [A2, B2, C2]):

touying3:=project(qumian, [A3, B3, C3]):

display(qumian, touying1,touying2,touying3, orientation=[40,70], lightmodel=light2, axes=boxed, scaling=constrained);

 

输出图形:

 

 用Maple画投影的图形 - calculus - 高等数学

 

 

用Maple画投影的图形 - calculus - 高等数学

 

  输入以下命令。

 

with(plots):with(plottools):a:=2:b:=3:c:=1:

qumian:=plot3d([a*sin(phi)*cos(t),b*sin(phi)*sin(t),c*cos(phi)],phi=0..Pi, t=0..2*Pi, style=patch):

A1:=[0,0,-3]: B1:=[1,0,-3]: C1:=[0,1,-3]:

A2:=[-6,1,0]: B2:=[-6,0,0]: C2:=[-6,0,1]:

A3:=[1,-6,0]: B3:=[0,-6,0]: C3:=[0,-6,1]:

touying1:=project(qumian, [A1, B1, C1]):

touying2:=project(qumian, [A2, B2, C2]):

touying3:=project(qumian, [A3, B3, C3]):

display(qumian, touying1,touying2,touying3, orientation=[40,70], lightmodel=light2, axes=boxed, scaling=constrained);

 

输出图形:

 

用Maple画投影的图形 - calculus - 高等数学

 

 

投影到任一平面

 

  

用Maple画投影的图形 - calculus - 高等数学

 

   输入以下命令:

 

with(plots): with(plottools):

qumian:=plot3d([u*sin(theta), u*cos(theta), u^2+1], u=-.5..1.5, theta=0..2*Pi, style=patch):

A:=[-3,0,0]: B:=[0,5,0]: C:=[0,0,-3]:

touying:=project(qumian, [A, B, C]):

display(qumian, touying, orientation=[20,60], lightmodel=light2, axes=normal, scaling=constrained);

 

输出图形:

 

用Maple画投影的图形 - calculus - 高等数学

 

 

with(plots): with(plottools):

qumian:=plot3d([u*sin(theta), u*cos(theta), u^2+1],u=-.5..1.5, theta=0..2*Pi, style=patch):

A:=[-7,0,0]: B:=[0,7,0]: C:=[0,0,-3]:

touying:=project(qumian, [A, B,C]):

pingmian:=polygonplot3d([A,B,C]):

display(qumian, touying, pingmian,orientation=[20,60], lightmodel=light2, axes=normal, scaling=constrained);

 

用Maple画投影的图形 - calculus - 高等数学
 
 

 

一些投影的图形

 

圆环面在坐标面上的投影

with(plots):with(plottools):

R:=3:r:=1:

qumian:=plot3d([(R+r*cos(t))*sin(theta),(R+r*cos(t))*cos(theta),r*sin(t)+4],t=0..2*Pi,theta=0..2*Pi,scaling=constrained,style=patch):

A:=[1,0,0]:B:=[0,1,0]:C:=[0,0,0]:

touying:=project(qumian,[A,B,C]):

x_axis:=plot3d([u,0,0],u=-2.2..5,v=0..0.01,thickness=3):

y_axis:=plot3d([0,u,0],u=-2.2..5,v=0..0.01,thickness=3):

z_axis:=plot3d([0,0,u],u=-.2..5,v=0..0.01,thickness=3):

xyz:=display(x_axis,y_axis,z_axis,thickness=3):

display([qumian,touying],xyz,orientation=[40,70],tickmarks=[4,4,4],axes=none,grid=[50,66],lightmodel=light2,
              scaling=constrained,axes=normal);

 

用Maple画投影的图形 - calculus - 高等数学
 
 
 

单叶双曲面的投影

with(plots): with(plottools): a:=1:b:=1.2:c:=1:

qumian:=plot3d([a*cosh(u)*cos(theta),b*cosh(u)*sin(theta),c*sinh(u)],u=-0.3*Pi..0.3*Pi,theta=0..2*Pi):

A1:=[1,0,-3]:B1:=[0,1,-3]:C1:=[0,0,-3]:

A2:=[1,-4,0]:B2:=[0,-4,0]:C2:=[0,-4,1]:

A3:=[-4,0,0]:B3:=[-4,1,0]:C3:=[-4,0,1]:

touying1:=project(qumian,[A1,B1,C1]):

touying2:=project(qumian,[A2,B2,C2]):

touying3:=project(qumian,[A3,B3,C3]):

display([qumian,touying1,touying2,touying3],orientation=[40,70],tickmarks=[4,4,4],axes=none,grid=[50,66],lightmodel=light2,
              scaling=constrained,axes=boxed);

 

用Maple画投影的图形 - calculus - 高等数学
 
 

锥面在坐标面上的投影

with(plots):with(plottools):

f:=u->u^2:

qumian:=plot3d([u*cos(theta),u*sin(theta),f(u)],u=1.6..2.3,theta=0..2*Pi,scaling=constrained,style=patch):

A:=[0,0,0]:B:=[1,1,-1]:

qumian:=rotate(qumian,Pi/3,[A,B]):

qumian:=translate(qumian,0,4,1):

A:=[0,0,0]:B:=[1,1,-1]:

qumian:=translate(qumian,6,5,3):

A1:=[1,0,0]:B1:=[0,1,0]:C1:=[0,0,0]:

A2:=[0,0,0]:B2:=[0,1,0]:C2:=[0,0,1]:

A3:=[0,0,0]:B3:=[1,0,0]:C3:=[0,0,1]:

touying1:=project(qumian,[A1,B1,C1]):

touying2:=project(qumian,[A2,B2,C2]):

touying3:=project(qumian,[A3,B3,C3]):

x_axis:=plot3d([u,0,0],u=-2.2..5,v=0..0.01,thickness=3):

y_axis:=plot3d([0,u,0],u=-2.2..5,v=0..0.01,thickness=3):

z_axis:=plot3d([0,0,u],u=-.2..3,v=0..0.01,thickness=3):

xyz:=display(x_axis,y_axis,z_axis,thickness=3):

display([qumian,touying1,touying2,touying3],xyz,orientation=[40,70],tickmarks=[4,4,4] ,axes=none,grid=[50,66],lightmodel=light2,
             scaling=constrained,axes=normal);

用Maple画投影的图形 - calculus - 高等数学
 
 
 
 

冰淇淋在坐标面上的投影

with(plots):with(plottools):

qumian:=cone([0,0,-1],0.7,color=yellow):

qumian2:=sphere([0,0,0.1],0.6,color=grey):

qumian:=translate(qumian,2,3,2):

qumian2:=translate(qumian2,2,3,2):

A1:=[1,0,0]:B1:=[0,1,0]:C1:=[0,0,0]:

A2:=[0,0,0]:B2:=[0,1,0]:C2:=[0,0,1]:

A3:=[0,0,0]:B3:=[1,0,0]:C3:=[0,0,1]:

touying1:=project(qumian,[A1,B1,C1]):

touying2:=project(qumian,[A2,B2,C2]):

touying3:=project(qumian,[A3,B3,C3]):

touying:=display(touying1,touying2,touying3):

Touying1:=project(qumian2,[A1,B1,C1]):

Touying2:=project(qumian2,[A2,B2,C2]):

Touying3:=project(qumian2,[A3,B3,C3]):

Touying:=display(Touying1,Touying2,Touying3):

x_axis:=plot3d([u,0,0],u=-1..2,v=0..0.01,thickness=3):

y_axis:=plot3d([0,u,0],u=-1..2,v=0..0.01,thickness=3):

z_axis:=plot3d([0,0,u],u=-0.2..2,v=0..0.01,thickness=3):

xyz:=display(x_axis,y_axis,z_axis,thickness=3):

display([qumian,qumian2,touying,Touying],xyz,orientation=[40,70],tickmarks=[4,4,4],grid=[20,20],lightmodel=light1,
             scaling=constrained,axes=normal);

 

用Maple画投影的图形 - calculus - 高等数学
 
 
 
 
用Maple画投影的图形 - calculus - 高等数学
with(plots): with(plottools): a:=1:

u:=(x,y)->2*x^2+3*y^2:

v:=(x,y)->4-2*x^2-y^2:

qumian1:=plot3d(u(x,y),x=-a..a,y=-sqrt(a^2-x^2)..sqrt(a^2-x^2),color=grey,style=patchnogrid):

qumian2:=plot3d(v(x,y),x=-a..a,y=-sqrt(a^2-x^2)..sqrt(a^2-x^2),color=green,style=patchnogrid):

quxian:=spacecurve([cos(t),sin(t),u(cos(t),sin(t))],t=0..2*Pi,color=red,thickness=4):

b:=3:

A1:=[b,0,0]:B1:=[0,b,0]:C1:=[0,0,0]:

A2:=[-b,0,0]:B2:=[-b,b,0]:C2:=[-b,0,b]:

A3:=[0,-b,0]:B3:=[b,-b,0]:C3:=[0,-b,b]:

touying1:=project(qumian1,[A1,B1,C1]):

touying2:=project(qumian1,[A2,B2,C2]):

touying3:=project(qumian1,[A3,B3,C3]):

touying:=display(touying1,touying2,touying3):

Touying1:=project(qumian2,[A1,B1,C1]):

Touying2:=project(qumian2,[A2,B2,C2]):

Touying3:=project(qumian2,[A3,B3,C3]):

Touying:=display(Touying1,Touying2,Touying3):

 

x_axis:=plot3d([u,0,0],u=-2..2,v=0..0.01,thickness=3):

y_axis:=plot3d([0,u,0],u=-2..2,v=0..0.01,thickness=3):

z_axis:=plot3d([0,0,u],u=-0.56..4.4,v=0..0.01,thickness=3):

xyz:=display(x_axis,y_axis,z_axis,thickness=3):

display([qumian1,qumian2,touying,Touying,quxian],xyz,orientation=[40,70],tickmarks=[4,4,4],grid=[20,20],lightmodel=light1,
             scaling=constrained,axes=normal);

 

 用Maple画投影的图形 - calculus - 高等数学

 

with(plots): with(plottools): a:=1:

u:=(x,y)->2*x^2+3*y^2:

v:=(x,y)->4-2*x^2-y^2:

qumian1:=plot3d(u(x,y),x=-a..a,y=-sqrt(a^2-x^2)..sqrt(a^2-x^2),color=grey,style=patchnogrid):

qumian2:=plot3d(v(x,y),x=-a..a,y=-sqrt(a^2-x^2)..sqrt(a^2-x^2),color=green,style=patchnogrid):

quxian:=spacecurve([cos(t),sin(t),u(cos(t),sin(t))],t=0..2*Pi,color=red,thickness=4):

b:=3:

A1:=[b,0,0]:B1:=[0,b,0]:C1:=[0,0,0]:

A2:=[-b,0,0]:B2:=[-b,b,0]:C2:=[-b,0,b]:

A3:=[0,-b,0]:B3:=[b,-b,0]:C3:=[0,-b,b]:

touying1:=project(qumian1,[A1,B1,C1]):

touying2:=project(qumian1,[A2,B2,C2]):

touying3:=project(qumian1,[A3,B3,C3]):

touying:=display(touying1,touying2,touying3):

Touying1:=project(qumian2,[A1,B1,C1]):

Touying2:=project(qumian2,[A2,B2,C2]):

Touying3:=project(qumian2,[A3,B3,C3]):

Touying:=display(Touying1,Touying2,Touying3):

Touying11:=project(quxian,[A1,B1,C1]):

Touying22:=project(quxian,[A2,B2,C2]):

Touying33:=project(quxian,[A3,B3,C3]):

Touying1:=display(Touying11,Touying22,Touying33):

x_axis:=plot3d([u,0,0],u=-2..2,v=0..0.01,thickness=3):

y_axis:=plot3d([0,u,0],u=-2..2,v=0..0.01,thickness=3):

z_axis:=plot3d([0,0,u],u=-0.56..4.4,v=0..0.01,thickness=3):

xyz:=display(x_axis,y_axis,z_axis,thickness=3):

display([qumian1,qumian2,touying,Touying,quxian,Touying1],xyz,orientation=[40,70],tickmarks=[4,4,4],grid=[20,20],lightmodel=light1,
              scaling=constrained,axes=boxed);

 
用Maple画投影的图形 - calculus - 高等数学
 
 

 

空间曲线的投影

 

 用Maple画投影的图形 - calculus - 高等数学

 

  

  输入以下命令:

 

with(plots): with(plottools):

quxian:=spacecurve([cos(t), sin(t), t], t=0..7, color=red, thickness=3):

A1:=[0,0,-2]: B1:=[1,0,-2]: C1:=[0,1,-2]:

A2:=[-6,1,0]: B2:=[-6,0,0]: C2:=[-6,0,1]:

A3:=[1,-6,0]: B3:=[0,-6,0]: C3:=[0,-6,1]:

touying1:=project(quxian, [A1, B1, C1]):

touying2:=project(quxian, [A2, B2, C2]):

touying3:=project(quxian, [A3, B3, C3]):

display(quxian, touying1,touying2,touying3, orientation=[40,70], lightmodel=light2, axes=frame, scaling=constrained);

 

输出图形:

 

 用Maple画投影的图形 - calculus - 高等数学

 

 

 

由于投影命令 project 不能设置颜色,可以分别作出曲线在坐标面上的投影曲线,并用不同的颜色区分。

输入以下命令:

 

with(plots):

x:=cos(t):y:=sin(t):z:=t:  a:=0: b:=7:

quxian:=spacecurve([x(t),y(t),z(t)], t=a..b,color=red,thickness=5):

touying1:=spacecurve([x(t),y(t),-3], t=a..b,color=blue,thickness=3):

touying2:=spacecurve([x(t),-6,z(t)], t=a..b,color=green,thickness=3):

touying3:=spacecurve([-6,y(t),z(t)], t=a..b,color=brown,thickness=3):

display(quxian, touying1,touying2,touying3, orientation=[40,70], lightmodel=light2, axes=frame, scaling=constrained);

 

输出图形:

 

用Maple画投影的图形 - calculus - 高等数学
 
 

with(plots):

x:=cos(t):y:=sin(t):z:=t:

a:=0:b:=20:

A:=-3:B:=-3:C:=0:

quxian:=spacecurve([x(t),y(t),z(t)], t=a..b,color=red):

touying1:=spacecurve([x(t),y(t),C], t=a..b,color=blue):

touying2:=spacecurve([x(t),B,z(t)], t=a..b,color=green):

touying3:=spacecurve([A,y(t),z(t)], t=a..b,color=brown):

display(quxian, touying1,touying2,touying3,thickness=3,axes=boxed,tickmarks=[0,0,0]);

 

用Maple画投影的图形 - calculus - 高等数学
 
 
 
用Maple画投影的图形 - calculus - 高等数学
  

  输入以下命令:

 

with(plots): with(plottools):
a:=-30:b:=-50:c:=0:

quxian1:=spacecurve([t*cos(t), t*sin(t), t], t=0..6*Pi, color=red, thickness=3):

quxian:=spacecurve([t*cos(t), t*sin(t), t], t=0..6*Pi, color=blue, thickness=3):

A1:=[0,0,c]: B1:=[1,0,c]: C1:=[0,1,c]:

A2:=[a,1,0]: B2:=[a,0,0]: C2:=[a,0,1]:

A3:=[1,b,0]: B3:=[0,b,0]: C3:=[0,b,1]:

touying1:=project(quxian, [A1, B1, C1]):

touying2:=project(quxian, [A2, B2, C2]):

touying3:=project(quxian, [A3, B3, C3]):

display(quxian1, touying1,touying2,touying3,axes=boxed,tickmarks=[0,0,0]);

 

输出图形:

 

 用Maple画投影的图形 - calculus - 高等数学

 

with(plots):

x:=t*cos(t):y:=t*sin(t):z:=t:

a:=0:b:=20:

A:=-30:B:=-50:C:=0:

quxian:=spacecurve([x(t),y(t),z(t)], t=a..b,color=red):

touying1:=spacecurve([x(t),y(t),C], t=a..b,color=blue):

touying2:=spacecurve([x(t),B,z(t)], t=a..b,color=green):

touying3:=spacecurve([A,y(t),z(t)], t=a..b,color=brown):

display(quxian, touying1,touying2,touying3,thickness=3,axes=boxed,tickmarks=[0,0,0]);

用Maple画投影的图形 - calculus - 高等数学

 

  评论这张
 
阅读(1329)| 评论(4)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016