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

徐小湛的博客

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

 
 
 

日志

 
 

转盘(图形与动画)  

2012-04-20 16:52:55|  分类: 高等数学图形动画 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

问题描述:一个大圆绕其圆心逆时针旋转,一个圆心在大圆上的小圆绕其圆心顺时针旋转,小圆的转速是大圆的k倍。求小圆上一点P的轨迹。

转盘 - calculus - 徐小湛的博客

 

Mathematica作图程序:

R=3;r=1;k=3;

A[t_]:=R {Cos[t],Sin[t]};
B[t_]:=r {Cos[-k t],Sin[-k t]};
r1[t_]:=A[t]+B[t];
r2=ParametricPlot[r1[t],{t,0,2Pi},PlotStyle->{Red,Thickness[0.01]}];
AA=ParametricPlot[A[t],{t,0,2Pi},PlotStyle->{Blue,Thickness[0.01]}];
Show[r2,AA,PlotRange->All,PlotLabel=>K==k]
 
R=3;r=1
 
 
转盘 - calculus - 徐小湛的博客
 
 
 
 
R=5;r=4
转盘 - calculus - 徐小湛的博客
 
 
 
R=3;r=1,
转盘 - calculus - 徐小湛的博客
 
 
 


Maple作图程序:

R:=3;r:=1;k:=4.7;
x1:=t->R*cos(t): y1:=t->R*sin(t):
x2:=t->r*cos(-k*t); y2:=t->r*sin(-k*t);
x(t):=x1(t)+x2(t); y(t):=y1(t)+y2(t);
with(plots):
yuan:=plot([x1(t),y1(t),t=0..2*Pi],thickness=3,color=blue):
quxian:=plot([x(t),y(t),t=0..6*Pi],thickness=3):
display(yuan,quxian);
 
转盘 - calculus - 徐小湛的博客
 
Maple动画:
 
 
 
 
转盘 - calculus - 徐小湛的博客
 
with(plots):with(plottools):
R:=3:r:=1:k:=-4.7:
x:=t->R*cos(t): y:=t->R*sin(t):
dayuan:=plot([x(t),y(t),t=0..2*Pi],color=green,thickness=6):
K:=400:for i from 0 to K do ti:=i*6*Pi/K:
yuan[i]:=plot([(R+r*cos(t))*cos(ti)-r*sin(t)*sin(ti),(R+r*cos(t))*sin(ti)+r*sin(t)*cos(ti),t=0..2*Pi],thickness=5,color=blue);
quxian[i]:=plot([(R+r*cos(k*t)-0*sin(k*t))*cos(t)-(r*sin(k*t)+0*cos(k*t))*sin(t),(R+r*cos(k*t)-0*sin(k*t))*sin(t)+(r*sin(k*t)+0*cos(k*t))*cos(t),t=0..ti],thickness=4,color=red);
xian1[i]:=plot([t*cos(ti)-0*sin(ti),t*sin(ti)+0*cos(ti),t=-R..R],thickness=10,color=green);
xian2[i]:=plot([0*cos(ti)-t*sin(ti),0*sin(ti)+t*cos(ti),t=-R..R],thickness=10,color=green) ;
xian3[i]:=plot([(R+t*cos(k*ti)-0*sin(k*ti))*cos(ti)-(t*sin(k*ti)+0*cos(k*ti))*sin(ti),(R+t*cos(k*ti)-0*sin(k*ti))*sin(ti)+(t*sin(k*ti)+0*cos(k*ti))*cos(ti),t=-r..r],thickness=5,color=blue);
xian4[i]:=plot([(R+0*cos(k*ti)-t*sin(k*ti))*cos(ti)-(0*sin(k*ti)+t*cos(k*ti))*sin(ti),(R+0*cos(k*ti)-t*sin(k*ti))*sin(ti)+(0*sin(k*ti)+t*cos(k*ti))*cos(ti),t=-r..r],thickness=3,thickness=5,color=blue) od:
yuan:=display(seq(yuan[i],i=0..K),insequence=true):
quxian:=display(seq(quxian[i],i=0..K),insequence=true):
xian1:=display(seq(xian1[i],i=0..K),insequence=true):
xian2:=display(seq(xian2[i],i=0..K),insequence=true):
xian3:=display(seq(xian3[i],i=0..K),insequence=true):
xian4:=display(seq(xian4[i],i=0..K),insequence=true):
display(xian1,xian2,xian3,xian4,dayuan,yuan,quxian,scaling=constrained);
 
转盘 - calculus - 徐小湛的博客
 
 
 
with(plots):with(plottools):
R:=3:r:=1:k:=-4.5:
x:=t->R*cos(t): y:=t->R*sin(t):
dayuan:=plot([x(t),y(t),t=0..2*Pi],color=green,thickness=3):
K:=200:for i from 0 to K do ti:=i*4*Pi/K:
yuan1[i]:=plot([(R+r*cos(t))*cos(ti)-r*sin(t)*sin(ti),(R+r*cos(t))*sin(ti)+r*sin(t)*cos(ti),t=0..2*Pi],thickness=3,color=blue);
yuan2[i]:=plot([(R+r*cos(t))*cos(ti+Pi/2)-r*sin(t)*sin(ti+Pi/2),(R+r*cos(t))*sin(ti+Pi/2)+r*sin(t)*cos(ti+Pi/2),t=0..2*Pi],thickness=3,color=blue);
yuan3[i]:=plot([(R+r*cos(t))*cos(ti+Pi)-r*sin(t)*sin(ti+Pi),(R+r*cos(t))*sin(ti+Pi)+r*sin(t)*cos(ti+Pi),t=0..2*Pi],thickness=3,color=blue);
yuan4[i]:=plot([(R+r*cos(t))*cos(ti-Pi/2)-r*sin(t)*sin(ti-Pi/2),(R+r*cos(t))*sin(ti-Pi/2)+r*sin(t)*cos(ti-Pi/2),t=0..2*Pi],thickness=3,color=blue);
quxian[i]:=plot([(R+r*cos(k*t)-0*sin(k*t))*cos(t)-(r*sin(k*t)+0*cos(k*t))*sin(t),(R+r*cos(k*t)-0*sin(k*t))*sin(t)+(r*sin(k*t)+0*cos(k*t))*cos(t),t=0..ti],thickness=3,color=red);
xian01[i]:=plot([t*cos(ti)-0*sin(ti),t*sin(ti)+0*cos(ti),t=-R..R],thickness=3,color=green);
xian02[i]:=plot([0*cos(ti)-t*sin(ti),0*sin(ti)+t*cos(ti),t=-R..R],thickness=3,color=green);
xian11[i]:=plot([(R+t*cos(k*ti)-0*sin(k*ti))*cos(ti)-(t*sin(k*ti)+0*cos(k*ti))*sin(ti),(R+t*cos(k*ti)-0*sin(k*ti))*sin(ti)+(t*sin(k*ti)+0*cos(k*ti))*cos(ti),t=-r..r],thickness=3,color=blue);
xian12[i]:=plot([(R+0*cos(k*ti)-t*sin(k*ti))*cos(ti)-(0*sin(k*ti)+t*cos(k*ti))*sin(ti),(R+0*cos(k*ti)-t*sin(k*ti))*sin(ti)+(0*sin(k*ti)+t*cos(k*ti))*cos(ti),t=-r..r],thickness=3,thickness=3,color=blue);
xian21[i]:=plot([(R+t*cos(k*(ti+Pi/2))-0*sin(k*(ti+Pi/2)))*cos(ti+Pi/2)-(t*sin(k*(ti+Pi/2))+0*cos(k*(ti+Pi/2)))*sin(ti+Pi/2),(R+t*cos(k*(ti+Pi/2))-0*sin(k*(ti+Pi/2)))*sin(ti+Pi/2)+(t*sin(k*(ti+Pi/2))+0*cos(k*(ti+Pi/2)))*cos(ti+Pi/2),t=-r..r],thickness=3,color=blue);
xian22[i]:=plot([(R+0*cos(k*(ti+Pi/2))-t*sin(k*(ti+Pi/2)))*cos(ti+Pi/2)-(0*sin(k*(ti+Pi/2))+t*cos(k*(ti+Pi/2)))*sin(ti+Pi/2),(R+0*cos(k*(ti+Pi/2))-t*sin(k*(ti+Pi/2)))*sin(ti+Pi/2)+(0*sin(k*(ti+Pi/2))+t*cos(k*(ti+Pi/2)))*cos(ti+Pi/2),t=-r..r],thickness=3,thickness=3,color=blue);
xian31[i]:=plot([(R+t*cos(k*(ti+Pi))-0*sin(k*(ti+Pi)))*cos(ti+Pi)-(t*sin(k*(ti+Pi))+0*cos(k*(ti+Pi/2)))*sin(ti+Pi),(R+t*cos(k*(ti+Pi))-0*sin(k*(ti+Pi)))*sin(ti+Pi)+(t*sin(k*(ti+Pi))+0*cos(k*(ti+Pi)))*cos(ti+Pi),t=-r..r],thickness=3,color=blue);
xian32[i]:=plot([(R+0*cos(k*(ti+Pi))-t*sin(k*(ti+Pi)))*cos(ti+Pi)-(0*sin(k*(ti+Pi))+t*cos(k*(ti+Pi)))*sin(ti+Pi),(R+0*cos(k*(ti+Pi))-t*sin(k*(ti+Pi)))*sin(ti+Pi)+(0*sin(k*(ti+Pi))+t*cos(k*(ti+Pi)))*cos(ti+Pi),t=-r..r],thickness=3,thickness=3,color=blue);
xian41[i]:=plot([(R+t*cos(k*(ti-Pi/2))-0*sin(k*(ti-Pi/2)))*cos(ti-Pi/2)-(t*sin(k*(ti-Pi/2))+0*cos(k*(ti-Pi/2)))*sin(ti-Pi/2),(R+t*cos(k*(ti-Pi/2))-0*sin(k*(ti-Pi/2)))*sin(ti-Pi/2)+(t*sin(k*(ti-Pi/2))+0*cos(k*(ti-Pi/2)))*cos(ti-Pi/2),t=-r..r],thickness=3,color=blue);
xian42[i]:=plot([(R+0*cos(k*(ti-Pi/2))-t*sin(k*(ti-Pi/2)))*cos(ti-Pi/2)-(0*sin(k*(ti-Pi/2))+t*cos(k*(ti-Pi/2)))*sin(ti-Pi/2),(R+0*cos(k*(ti-Pi/2))-t*sin(k*(ti-Pi/2)))*sin(ti-Pi/2)+(0*sin(k*(ti-Pi/2))+t*cos(k*(ti-Pi/2)))*cos(ti-Pi/2),t=-r..r],thickness=3,thickness=3,color=blue)
od:
 
yuan1:=display(seq(yuan1[i],i=0..K),insequence=true):
yuan2:=display(seq(yuan2[i],i=0..K),insequence=true):
yuan3:=display(seq(yuan3[i],i=0..K),insequence=true):
yuan4:=display(seq(yuan4[i],i=0..K),insequence=true):
quxian:=display(seq(quxian[i],i=0..K),insequence=true):
xian01:=display(seq(xian01[i],i=0..K),insequence=true):
xian02:=display(seq(xian02[i],i=0..K),insequence=true):
xian11:=display(seq(xian11[i],i=0..K),insequence=true):
xian12:=display(seq(xian12[i],i=0..K),insequence=true):
xian21:=display(seq(xian21[i],i=0..K),insequence=true):
xian22:=display(seq(xian22[i],i=0..K),insequence=true):
xian31:=display(seq(xian31[i],i=0..K),insequence=true):
xian32:=display(seq(xian32[i],i=0..K),insequence=true):
xian41:=display(seq(xian41[i],i=0..K),insequence=true):
xian42:=display(seq(xian42[i],i=0..K),insequence=true):
display(xian11,xian12,xian21,xian22,xian31,xian32,xian41,xian42,xian01,xian02,dayuan,yuan1,yuan2,yuan3,yuan4,quxian,scaling=constrained);
  评论这张
 
阅读(995)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

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

页脚

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