R = 20;
r1 = 3;
am0 = Pi/3;
uu[u0_, v_] := Block[{},
Which[v <= Pi, u0 + (1 - 2*u0/Pi)*v,
v > Pi, 2*Pi - 3*u0 - (1 - 2*u0/Pi)*v]];
three[n_] :=
Block[{k, am, qm, ae, qe, xm, ym, zm, x1, y1, z1, xe, ye, ze, gg0, g},
For[k = 0, k < n, k++,
ae = k*Pi/18;
qm = Mod[k, 6]*Pi/3;
am = uu[am0, qm];
xe = R*Cos[ae];
ye = R*Sin[ae];
ze = 0;
x1 = r1*Sin[am]*Sin[qm];
y1 = r1*Sin[am]*Cos[qm];
z1 = r1*Cos[am];
xm = xe + x1*Sin[ae] + y1*Cos[ae];
ym = ye + y1*Sin[ae] + x1*Cos[ae];
zm = z1;
gg0 = ParametricPlot3D[{R*Cos[v], R*Sin[v], u},
{u, -0.01, 0.01}, {v, 0, 2 Pi},
Boxed -> False,
Axes -> False,
PlotRange -> {{-26, 26}, {-26, 26}, {-10, 10}},
DisplayFunction -> Identity];
g = Graphics3D[{{PointSize[0.2], RGBColor[1, 0, 0],
Point[{0, 0, 0}]},
{PointSize[0.06], RGBColor[0, 0, 1], Point[{xe, ye, ze}]},
{PointSize[0.03], RGBColor[0.8, 0, 0.8], Point[{xm, ym, zm}]}},
PlotRange -> {{-26, 26}, {-26, 26}, {-2, 2}}];
Show[gg0, g, ViewPoint -> {50, 50, 6},
DisplayFunction -> $DisplayFunction]]]
这个程序运行不了啊,为什么
------解决方案--------------------
Print[Show[gg0, g, ViewPoint -> {50, 50, 6}]]