SHARE
TWEET

Untitled

a guest Oct 12th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Clear[P, t];
  2. P[t_] = {-t, t, (2/3) t (7 - t)};
  3. archplot = ParametricPlot3D[P[t], {t, 0, 7}, PlotStyle -> {Blue, Thickness[0.01]}];
  4. unittan[t_] = P'[t]/Sqrt[P'[t] . P'[t]];
  5. mainunitnormal[t_] = N[unittan'[t]/Sqrt[Expand[unittan'[t] . unittan'[t]]]];
  6. binormal[t_] = N[Cross[unittan[t], mainunitnormal[t]]];
  7. Clear[radius];
  8. radius[t_] = (t/2)^2 + 0.1;
  9. ParametricPlot3D[Evaluate[P[t] + radius[t] Cos[s] mainunitnormal[t] + radius[t] Sin[s] binormal[t]], {t, 0, 7}, {s, 0, 2 Pi}, ViewPoint -> CMView, BoxRatios -> Automatic, AxesLabel -> {"x", "y", "z"}]
RAW Paste Data
Top