微明火花试验网    微明火花试验网   WeiMing Intrinsic Safety Spark Test
搏之不得,名曰;见小曰。  《道德经》  It is such a small thing that you can not touch it ,named WEI; But you can feel it,named MING. Written by Laozi《Tao Te Ching》


用Mathematica绘制3D齿轮 3D镉盘 3D火花试验装置

其源代码如下:
m = 1; z = 50; ha = 1; c = 0.25; zhouju = 31.5; r = m*z/2; rb = r*Cos[Pi/9]; ra = r + ha*m; rf = r - (ha + c)*m; sita = 2*Pi/z; almax = ArcCos[rb/ra]; alg = ArcCos[rb/r]; ct1 = Tan[alg] - alg; ct2 = Tan[(almax)] - almax; bita = sita/4. + ct1 - ct2; p12 = {}; p50 = {}; (*Table[AppendTo[xya,{ra*Cos[(fai+i*sita)],ra*Sin[(fai+i*sita)]}],{\ fai,-bita,bita,0.001}]; Table[AppendTo[xyb,{rb*Cos[(fail+i*sita)],rb*Sin[(fail+i*sita)]}],{\ fail,bita+ct2,sita-bita-ct2,0.01}];*) For[i = 0, i <= z, i++, AppendTo[p50, {ParametricPlot[{ra*Cos[(fai + i*sita)] + zhouju, ra*Sin[(fai + i*sita)]}, {fai, -bita, bita}], ParametricPlot[{rb*Cos[(fail + i*sita)] + zhouju, rb*Sin[(fail + i*sita)]}, {fail, bita + ct2, sita - bita - ct2}], ParametricPlot[{(rb/Cos[(al)])* Cos[(-(Tan[(al)] - al) + (i + 0.25)*sita + ct1)] + zhouju, (rb/Cos[(al)])* Sin[(-(Tan[(al)] - al) + (i + 0.25)*sita + ct1)]}, {al, 0, almax}], ParametricPlot[{rb/Cos[(al2)]* Cos[(Tan[(al2)] - al2 + (i - 0.25)*sita - ct1)] + zhouju, rb/Cos[(al2)]* Sin[(Tan[(al2)] - al2 + (i - 0.25)*sita - ct1)]}, {al2, 0, almax}]}] ]; z = 12; r = m*z/2; rb = r*Cos[Pi/9]; ra = r + ha*m; rf = r - (ha + c)*m; sita = 2*Pi/z; almax = ArcCos[rb/ra]; alg = ArcCos[rb/r]; ct1 = Tan[alg] - alg; ct2 = Tan[(almax)] - almax; bita = sita/4. + ct1 - ct2; For[i = 0, i <= z, i++, AppendTo[p12, {ParametricPlot[{ra*Cos[(fai + (i + 0.5)*sita)], ra*Sin[(fai + (i + 0.5)*sita)]}, {fai, -bita, bita}], ParametricPlot[{rb*Cos[(fail + (i + 0.5)*sita)], rb*Sin[(fail + (i + 0.5)*sita)]}, {fail, bita + ct2, sita - bita - ct2}], ParametricPlot[{(rb/Cos[(al)])* Cos[(-(Tan[(al)] - al) + (i + 0.25 + 0.5)*sita + ct1)], (rb/ Cos[(al)])* Sin[(-(Tan[(al)] - al) + (i + 0.25 + 0.5)*sita + ct1)]}, {al, 0, almax}], ParametricPlot[{rb/Cos[(al2)]* Cos[(Tan[(al2)] - al2 + (i - 0.25 + 0.5)*sita - ct1)], rb/Cos[(al2)]* Sin[(Tan[(al2)] - al2 + (i - 0.25 + 0.5)*sita - ct1)]}, {al2, 0, almax}]}] ]; Show[p12, p50, Axes -> None, PlotRange -> All, AspectRatio -> 52/64]


Mathematica生成的3D齿轮



下图是用建模软件生成的3D模型生成的GIF齿轮动画。
3D模型生成的GIF齿轮动画

最新查询
分享按钮