# How can I auto rotate a contour 3D plot around an axis?

How can I automatically spin a contour 3D plot around its axis? I created a contour 3D plot of a hyperbolic geodesic but couldn't seem to find a function to make it automatically rotate.

Here is the code I used to create the hyperbolic geodesic:

ContourPlot3D[
x^2 +  y^2 - a z^2 == 1, {x, -5, 5}, {y, -5, 5}, {z, -2, 2},
PlotTheme->"Web"]

• resources.wolframcloud.com/FunctionRepository/resources/… Commented Apr 27, 2020 at 18:21
• Thanks Chip! Tried that but the geodesic didn't seem to spin. Could you please suggest a code to spin the geodesic automatically. Commented Apr 27, 2020 at 19:30
• Is this what you are looking for? ResourceFunction["SpinShow"][ ContourPlot3D[ x^2 + y^2 - 3 z^2 == 1, {x, -5, 5}, {y, -5, 5}, {z, -2, 2}, PlotTheme -> "Web", Axes -> False, Boxed -> False]]? Commented Apr 27, 2020 at 21:15

You can do with Animate:

plot = ContourPlot3D[
x^2 + y^2 - z^2 == 1, {x, -5, 5}, {y, -5, 5}, {z, -2, 2},
PlotTheme -> "Web"]

Animate[Show[plot, SphericalRegion -> True,
ViewPoint -> RotationTransform[t, {0, 0, 1}][{3, 0, 3}]], {t, 0,
2 Pi}]


or Dynamic with Clock:

Show[plot,
ViewPoint ->
Dynamic[RotationTransform[Clock[{0, 2 Pi}, 5], {0, 0, 1}][{3, 0,
3}]], SphericalRegion -> True]


or

ContourPlot3D[
x^2 + y^2 - z^2 == 1, {x, -5, 5}, {y, -5, 5}, {z, -2, 2},
PlotTheme -> "Web",
ViewPoint ->
Dynamic[RotationTransform[Clock[{0, 2 Pi}, 5], {0, 0, 1}][{3, 0,
3}]], SphericalRegion -> True]

• Thank you @halmir Commented Apr 28, 2020 at 7:45
• I tried the code suggested by you and could see the viewpoint coordinate values are changing and the slider seems to be moving, but the visualisation does not seem to be spinning. I tried several options, but haven't succeeded in making the rendered object spin. Would there be any additional suggestions to make the visualisation spin? Commented Apr 28, 2020 at 9:15