SHARE
TWEET

Untitled

a guest Feb 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Clear[s, P];
  2. P[s_] = {-2 s, 3 s, 2 s^2};
  3. unittan[s_] = P'[s]/Sqrt[P'[s] . P'[s]];
  4. mainunitnormal[s_] = N[unittan'[s]/Sqrt[Expand[unittan'[s] . unittan'[s]]]];
  5. Clear[binormal];
  6. binormal[s_] = Cross[unittan[s], mainunitnormal[s]];
  7. Clear[hornskin, r];
  8. r[s_] = 0.5 s^2;
  9. hornskin[s_, t_] = Together[P[s] + r[s] Cos[t] mainunitnormal[s] + r[s] Sin[t] binormal[s]];
  10. ParametricPlot3D[Evaluate[hornskin[s, t]], {s, 0, 2}, {t, 0, 2 Pi}, AxesLabel -> {"x", "y", "z"}, ViewPoint -> CMView];
  11.  
  12.  
  13. Clear[x, y, z, r, s, t];
  14. r[s_] = 0.5 s^2;
  15. {x[r_, s_, t_], y[r_, s_, t_], z[r_, s_, t_]} = Chop[Simplify[P[s] + r Cos[t] mainunitnormal[s] + r Sin[t] binormal[s]]];
  16. Clear[gradx, grady, gradz, Vxyz];
  17. gradx[r_, s_, t_] = {D[x[r, s, t], r], D[x[r, s, t], s], D[x[r, s, t], t]};
  18. grady[r_, s_, t_] = {D[y[r, s, t], r], D[y[r, s, t], s], D[y[r, s, t], t]};
  19. gradz[r_, s_, t_] = {D[z[r, s, t], r], D[z[r, s, t], s], D[z[r, s, t], t]};
  20. Vxyz[r_, s_, t_] = Simplify[Simplify[TrigReduce[Det[{gradx[r, s, t], grady[r, s, t], gradz[r, s, t]}]]]];
  21.  
  22. volume = NIntegrate[Abs[Vxyz[r, s, t]], {t, 0, 2 Pi}, {s, 0, 2}, {r, 0, 0.5 s^2}]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top