Preamble
In this post from several years ago: , it has been suggested that a "Globe" method is available for RotationControl
.
Graphics3D[Cone[], Method -> {"RotationControl" -> "Globe"}]
That option doesn't seem to be documented anymore, although no error is reported on its use. Graphics3D docs still have a method RotationalControl" -> "ArcBall"
(no idea what it is)
Another post shows how to use manipulate to stabilize the rotation.
Task
I want to stabilize rotation of a globe or other 3D objects while viewing preferably without using any automation or manipulate. First I try it on a simpler example with two 3D shapes and it seems to have ignored the `RotationControl`. Assume that these objects are sitting on a turntable and I want to rotate the turntable. No other movement is allowed. Perhaps my usage of the command is not correct.Graphics3D[{
Glow[Green],
Cuboid[{0, 0, 0}],
Glow[Red],
Cone[]
},
Boxed -> False,
RotationAction -> "Clip",
Method -> {"RotationControl", "Globe"},
ImageSize -> 300,
ImagePadding -> 30,
ImageMargins -> 40,
ViewPoint -> {Pi, Pi/2, 2}
]
Code for the globe This code has adapted to work with Mma12.2 from a older post.
globe = SphericalPlot3D[1, {u, 0, Pi}, {v, 0, 2 Pi},
PlotPoints -> 50,
MaxRecursion -> 0,
Mesh -> True,
TextureCoordinateFunction -> ({#5, 1 - #4} &),
Boxed -> False,
Method -> {"RotationControl", "Globe"},
Axes -> False,
PlotStyle -> Directive[
Texture[
(*Import["C:\\map.png"]],*)
Import["https://i.sstatic.net/5JpK4.jpg"]],
Specularity[White, 1000],
],
Lighting -> "Neutral"
]
Question
While plotting Graphics3D or other 3D plots, is there a way to stabilize/force rotation of an object along latitudes and/or longitudes or other axes? What method(s) and/or option(s) are available for this purpose with such commands?
Thanks for reading.
======= First edit to include the info in Domen's answer ======
I should have pasted the code and searched harder. I went searching in the SphericalPlot pages. Notice the two cursor modes on a Graphics3D output. At the edges the cursor is circular and near the center it is elliptical arrows. Spherical cursor is more restrictive in the movements that it allows.
SphericalRegion
Screen capture from docs shows that it is not working as stated. But I am not sure if there are more options that go with it.
RotationControl
Using an example from the docs. I would say the globe is slightly better stabilized and the spherical cursor has gone away on all these modes, but still plot can be moved in arbitrary ways. (Code is included below if reqd)
Manipulate[Plot3D[Sin[x y], {x, 0, 2 \[Pi]}, {y, 0, 2 \[Pi]},
Method -> {"RotationControl" -> method}],
{
{method, "Globe", "Rotation method:"},
{"Globe", "ArcBall", "TrackBall"}}
]
What I am seeking through the question above is options so that the globe can move as a "physical globe" along one axis or graphics items could seem to rotate on a turntable. Once again, I would like to thank Domen for his reply.