Edit: Some additional viewpoints were included to make it easier to test. Here's code for an alternative function, the graph of which is a bit less symmetric. Feel free to use either code set:
f = ArcCoth; Manipulate[
Plot3D[Abs[f[x + I y]], {x, -2, 2}, {y, -2, 2},
RegionFunction -> Function[{x, y, z}, x^2 + y^2 <= 4],
MeshFunctions ->
Function @@@ {{{x, y, z}, Re[f[x + I y]]}, {{x, y, z},
Im[f[x + I y]]}}, MeshStyle -> {Orange, Green},
BoxRatios -> {1, 1, 1},
ViewPoint -> Dynamic[vp]], {{vp, {5, 8, 4}, "viewpoint"}, {
{5, 8, 4} -> "mathematicians' default",
{1.3, -2.4, 2} -> "Mathematica's default",
{0, -2, 0} -> "in front",
{0, -2, 2} -> "in front and up",
{0, -2, -2} -> "in front and down",
{-2, -2, 0} -> "left-hand corner",
{2, -2, 0} -> "right-hand corner",
{0, 0, 2} -> "directly above",
{0, -Infinity, 0} -> "xz from y at -\[Infinity]",
{0, 0, Infinity} -> "xz from z at \[Infinity]"
},
ControlType -> PopupMenu}]
It's easy to place preset ViewPoint
s in a PopupMenu
in order to switch among them.
But if I manually rotate the graphics object, the program ceases to respond to changes in the PopupMenu
selection.
Is there a way to have both functionalities?: (1) the PopupMenu
and (2) manual rotation.
If the answer is no, is there at least a way to turn off manual rotation?
Below is a simplified version of the code.
Manipulate[
Plot3D[{x^2 + y^2, -x^2 - y^2}, {x, -2, 2}, {y, -2, 2},
RegionFunction -> Function[{x, y, z}, x^2 + y^2 <= 4],
BoxRatios -> {1, 1, 1}, ViewPoint -> Dynamic@vp],
Control[{{vp, {5, 8, 4}, "viewpoint"}, {
{5, 8, 4} -> "mathematicians' default",
{1.3, -2.4, 2} -> "Mathematica's default",
{0, -2, 0} -> "in front",
{0, -2, 2} -> "in front and up",
{0, -2, -2} -> "in front and down",
{-2, -2, 0} -> "left-hand corner",
{2, -2, 0} -> "right-hand corner",
{0, 0, 2} -> "directly above",
{0, -Infinity, 0} -> "xz from y at -\[Infinity]",
{0, 0, Infinity} -> "xz from z at \[Infinity]"
},
ControlType -> PopupMenu}]]
Deploy@Plot...
$\endgroup$Deployed -> True
as an option of Manipulate. $\endgroup$Manipulate
and this option is available. $\endgroup$