bin[N_, k_] := Binomial[n, k] bezier[V_] := Block[{n, k, out}, (n = Length[V] - 1; out = Sum[V[[k + 1]] bin[ n, k] t^k(1 - t)^(n - k), {k, 0, n}]; Return[Expand[out]])] cur = bezier[{{0, 16}, {2, 0}, {45, 45}, {0, 2}, {16, 0}}] dispbez[curve_] := ParametricPlot[curve, {t, 0, 1}, AspectRatio -> Automatic] dispbez[cur] revolve[curve_] := Block[{y, z}, (y = curve[[1]]; z = curve[[2]]; Return[{y Cos[alpha], y Sin[alpha], z}])] sur = revolve[cur] PP3[surfaces_] := param[surfaces, {t, 0, 1}, {alpha, 0, 2 Pi}, AspectRatio -> 1, Axes -> True, PlotRange -> All] /. param -> ParametricPlot3D PP3[sur] VPO3[surfaces_, a_, b_, c_] := param[surfaces, {t, 0, 1}, {alpha, 0, 2Pi}, AspectRatio -> 1, ViewPoint -> {a, b, c}, Axes -> True] /. param -> ParametricPlot3D VPO3[sur, -1, .6, .6] VPO3[sur, -1, -.6, -.6] chihat = revolve[{3t^2, Log[2 - t]}] pichat = revolve[{3t^2, 7 Log[2 - t]^2}] VPO3[chihat, 4, 3, .5] VPO3[pichat, 4, 3, .5] VPO3[pichat, 3, 3, -1] sphere[C_, R_] := C + revolve[{R Cos[Pi (t - 1/2)], R Sin[Pi (t - 1/2)]}] ball = sphere[{0, 0, 0}, 1] PP3[ball] VPO3[{pichat, ball}, 3, 3, -1] ball2 = sphere[{0, 0, -4}, 3] VPO3[{pichat, ball, ball2}, 3, 3, -1] ParametricPlot[{2 + Sin[2 Pi t], 2 Pi t}, {t, 0, 1}] amphor=revolve[{2 + Sin[2 Pi t], 2 Pi t}] PP3[amphor] abso[V_]:=Sqrt[V[[1]]^2+V[[2]]^2+V[[3]]^2] TT[cur_] := Block[{ut, den, te}, (te = D[cur, t]; den = abso[te]; ut = te/den; Return[ut])] NN[cur_] := Block[{ut, den, te, UTG}, (UTG = TT[cur]; ut = TT[UTG]; Return[ut])] curve1[a_, r_, b_] := {r Cos[2 Pi b t], r Sin[2 Pi b t], a t} Cross[{a1, a2, a3}, {b1, b2, b3}] ra := Random[] raunit := Block[{v, ut}, (v = {ra, ra, ra}; ut = v/abso[v]; Return[ut])] gopher[cur_, r_] := Block[{T, N, B, ut}, ( T = TT[cur]; N = TT[T]; B = Cross[T, N]; ut = cur + r Cos[alpha] N + r Sin[alpha] B; Return[ut])] disp[curve_] := para[curve, {t, 0, 1}, AspectRatio -> Automatic, Axes -> True] /. para -> ParametricPlot disp3[curve_] := para[curve, {t, 0, 1}, AspectRatio -> Automatic, Axes -> True] /.para ->ParametricPlot3D body = bezier[{3, -1, 9, -3, 2}] xaxis = bezier[{{0, 0}, {15, 0}}] disp[{{15 t, body}, xaxis}] disp[{t, t^2, t^3}] cur[5, 3, 2] GG1 = gopher[{5t, 8 t^2, 5 t^3}, body] dispsurf[surfaces_, a_, b_, c_, m_] := param[surfaces, {t, 0, 1}, {alpha, 0, 2 Pi}, AspectRatio -> Automatic, Axes -> True, ViewPoint -> {a, b, c}, PlotPoints -> m] /. param -> ParametricPlot3D dispsurf[GG1, 14, 2, 13, 40] dispsurf[GG1, 14, 12, 13,30] dispsurf[GG1, 14, -12, 13,20]