MATHEMATICA CODE


ab[x_,y_,z_]:=Sqrt[x^2+y^2+z^2];
f[x_]:=(8+1.5Cos[1.5x])Cos[x];
g[x_]:=(8+1.5Cos[1.5x])Sin[x];
h[x_]:=5Sin[1.5x];
p[x_]:={f[x],g[x],h[x]};
ff[x_]:=D[f[x],x];
gg[x_]:=D[g[x],x];
hh[x_]:=D[h[x],x];
uu[x_]:={-gg[x],ff[x],0};
u[x_]=uu[x]/ab[-gg[x],ff[x],0];
vv[x_]:={-ff[x] hh[x],-hh[x]gg[x],ff[x]^2+gg[x]^2};
v[x_]=vv[x]/ab[-ff[x] hh[x],-hh[x]gg[x],ff[x]^2+gg[x]^2];
ParametricPlot3D[
p[s]+u[s] Cos[t]+v[s]Sin[t],
{s,0,4Pi},{t,0,2Pi},Axes->False,
Boxed->False,PlotPoints->{121,11},
ViewPoint->{0.326, -2.669, 2.054}, LightSources -> { {{1, 0, 1}, RGBColor[ 1, 0, 0]}, {{1, 1, 1}, RGBColor[ 0, 1, 0]}, {{0, 1, 1}, RGBColor[ 0, 0, 1.]}, {{0, 1,-1}, RGBColor[.6, .1, .1]}, {{0, 0,-1}, RGBColor[.1, .6, .1]}, {{1, 0,-1}, RGBColor[.1, .1, .6]}} ]
  フレームの中でドラッグすると回転し、離すとそのまま回転を続けます。