其源代码如下:
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]