Matthen

Gaussian Curvature

Jun 4th, 2011
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. Manipulate[
  2. a = If[t < 0.5, -1 + 2 t, If[t < 0.6, 0, If[t > 0.6, 1.1 t - 0.6]]];
  3. Show[Plot3D[{Sqrt[1 + If[a <= 0, a, -a] x^2 + a y^2], 1}, {x, -2,
  4. 2}, {y, -2, 2}, PlotRange -> {0, 2}, Boxed -> False, Axes -> None,
  5. PlotStyle -> {Directive[Yellow, Specularity[White, 20],
  6. Opacity[0.8]],
  7. Directive[Red, Specularity[White, 20], Opacity[0.8]]},
  8. Mesh -> {2, 4}, ViewPoint -> {5 Sin[t/2], 5 Cos[t/2], 2}],
  9. Graphics3D[{PointSize[0.02], Thick,
  10. If[a < 0, {Black,
  11. Text[Style["Positive Curvature", Large], {0, 0, 2}], Blue,
  12. Point[{0, 0, 1.05}]},
  13. If[a == 0, {Black,
  14. Text[Style["Zero Curvature", Large], {0, 0, 2}], Blue,
  15. Polygon[{{-2, -2, 1}, {-2, 2, 1}, {2, 2, 1}, {2, -2, 1}}]},
  16. If[a > 0, {Black,
  17. Text[Style["Negative Curvature", Large], {0, 0, 2}], Blue,
  18. Line[{{-2, -2, 1.05}, {2, 2, 1.05}}],
  19. Line[{{-2, 2, 1.05}, {2, -2, 1.05}}]}]
  20. ]]
  21. }]
  22. ], {t, 0, 1}]
Advertisement
Add Comment
Please, Sign In to add comment