Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Manipulate[
- a = If[t < 0.5, -1 + 2 t, If[t < 0.6, 0, If[t > 0.6, 1.1 t - 0.6]]];
- Show[Plot3D[{Sqrt[1 + If[a <= 0, a, -a] x^2 + a y^2], 1}, {x, -2,
- 2}, {y, -2, 2}, PlotRange -> {0, 2}, Boxed -> False, Axes -> None,
- PlotStyle -> {Directive[Yellow, Specularity[White, 20],
- Opacity[0.8]],
- Directive[Red, Specularity[White, 20], Opacity[0.8]]},
- Mesh -> {2, 4}, ViewPoint -> {5 Sin[t/2], 5 Cos[t/2], 2}],
- Graphics3D[{PointSize[0.02], Thick,
- If[a < 0, {Black,
- Text[Style["Positive Curvature", Large], {0, 0, 2}], Blue,
- Point[{0, 0, 1.05}]},
- If[a == 0, {Black,
- Text[Style["Zero Curvature", Large], {0, 0, 2}], Blue,
- Polygon[{{-2, -2, 1}, {-2, 2, 1}, {2, 2, 1}, {2, -2, 1}}]},
- If[a > 0, {Black,
- Text[Style["Negative Curvature", Large], {0, 0, 2}], Blue,
- Line[{{-2, -2, 1.05}, {2, 2, 1.05}}],
- Line[{{-2, 2, 1.05}, {2, -2, 1.05}}]}]
- ]]
- }]
- ], {t, 0, 1}]
Advertisement
Add Comment
Please, Sign In to add comment