Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14031 > unrolled thread

3D ViewPoint Selector (V5.2) in higher Mathematica versions ?

Started by"Dr. Robert Kragler" <kragler@hs-weingarten.de>
First post2013-04-03 08:08 +0000
Last post2013-04-05 02:29 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  3D ViewPoint Selector (V5.2) in higher Mathematica versions ? "Dr. Robert Kragler" <kragler@hs-weingarten.de> - 2013-04-03 08:08 +0000
    Re: 3D ViewPoint Selector (V5.2) in higher Mathematica versions ? "Alexander Elkins" <alexander_elkins@hotmail.com> - 2013-04-04 02:50 +0000
    Re: 3D ViewPoint Selector (V5.2) in higher Mathematica versions ? awnl <awnl@gmx-topmail.de> - 2013-04-05 02:29 +0000

#14031 — 3D ViewPoint Selector (V5.2) in higher Mathematica versions ?

From"Dr. Robert Kragler" <kragler@hs-weingarten.de>
Date2013-04-03 08:08 +0000
Subject3D ViewPoint Selector (V5.2) in higher Mathematica versions ?
Message-ID<kjgo10$pui$1@smc.vnet.net>
Hi,
in Mathematica V 5.2 there was a useful graphics tool being envoked by Menu > 
Input > *3D ViewPoint Selector*. With this interactive palette/notebook one 
could easily determine the Cartesian or Spherical coordinates (i.e. {theta, phi, 
r} resp. {x,y,} ) of a wireframe cube and then paste these values for the 
optimized view of the rotated cube into another Mathematica graphics.

Unfortunately this tool became obsolete from version 6.0. on (which is mainly 
due to the fact that 3D graphics can be manipulated interactively in higher 
Mathematica versions.) Nevertheless, in order to determine the optimum viewpoint 
coordinates I sometimes miss this tool. And I just searched in the installation 
tree structure of Mathematica V5.2 (and higher versions too) for a notebook 
resp. palette with the name 3DViewPointSelector (or similar) but could not find 
this tool even in V5.2. Of course, one could write a litte application with 
Manipulate for rotating a wireframe cube and read out the viewpoint coordinates. 
But if this tool already exists why do additional efforts...

Does anyone know where to look for this nice graphics tool which (if available) 
would certainly be applicable in other Mathematica versions too. Help would be 
appreciated.

Thanks  R. Kragler

-- 
Prof. Dr. Robert Kragler
Email : kragler@hs-weingarten.de
URL :   http://portal.hs-weingarten.de/web/kragler

[toc] | [next] | [standalone]


#14043

From"Alexander Elkins" <alexander_elkins@hotmail.com>
Date2013-04-04 02:50 +0000
Message-ID<kjippo$3jr$1@smc.vnet.net>
In reply to#14031
This one has been answered before, look for "Viewpoint selector for Mac in
6.0"
in the archives for this group and you will find an answer here:
forums.wolfram.com/mathgroup/archive/2008/Mar/msg00766.html

Here is my own version which uses slider manipulation to change ViewPoint
for a graphic using any combination of x,y,z position and/or angles and
radial distance:
Manipulate[
Show[g, TicksStyle -> {Red, Green, Blue}, Ticks -> None, Axes -> True,
AxesStyle -> Thread[List[{Red, Green, Blue}, Thick]],
BaseStyle -> {FontWeight -> Bold, FontFamily -> "sans-serif", 28},
LabelStyle -> 14, AxesEdge -> {{-1, -1}, {-1, -1}, {-1, -1}},
AxesLabel -> {"X", "Y", "Z"}, SphericalRegion -> True,
Method -> {"RotationControl" -> "Globe"},
ViewPoint ->
Dynamic[vp,
Function[{v, e}, \[Theta] =
Mod[ArcTan[v[[3]], Norm[v[[1 ;; 2]]]] 180/\[Pi], 180]; \[Phi] =
Mod[ArcTan[v[[1]], v[[2]]] 180/\[Pi], 360];
r = Norm[v]; {x, y, z} = e = v, HoldRest]],
ViewVertical ->
Dynamic[vv, Function[{v, e}, e = {0., 0., 1.}(*v*), HoldRest]]], {{x, 1.3,
"x"}, -4, 4,
Manipulator[
Dynamic[x, (\[Theta] =
Mod[ArcTan[z, Norm[{#, y}]] 180/\[Pi], 180]; \[Phi] =
Mod[ArcTan[#, y] 180/\[Pi], 360]; r = Norm[{#, y, z}]; vp = {#, y, z};
x = #) &], #2, Appearance -> "Labeled"] &}, {{y, -2.4, "y"}, -4, 4,
Manipulator[
Dynamic[y, (\[Theta] =
Mod[ArcTan[z, Norm[{x, #}]] 180/\[Pi], 180]; \[Phi] =
Mod[ArcTan[x, #] 180/\[Pi], 360]; r = Norm[{x, #, z}]; vp = {x, #, z};
y = #) &], #2, Appearance -> "Labeled"] &}, {{z, 2.0, "z"}, -4, 4,
Manipulator[
Dynamic[z, (\[Theta] = Mod[ArcTan[#, Norm[{x, y}]] 180/\[Pi], 180];
r = Norm[{x, y, #}]; vp = {x, y, #}; z = #) &], #2,
Appearance -> "Labeled"] &}, {{\[Theta],
Mod[ArcTan[2., Norm[{1.3, -2.4}]] 180/\[Pi], 180], "\[Theta]"}, 0, 180,
Manipulator[
Dynamic[\[Theta], ({x, y, z} =
vp = r {Sequence @@ ({Cos[\[Phi] \[Pi]/180],
Sin[\[Phi] \[Pi]/180]} Sin[# \[Pi]/180]),
Cos[# \[Pi]/180]}; \[Theta] = #) &], #2,
Appearance -> "Labeled"] &}, {{\[Phi],
Mod[ArcTan[1.3, -2.4] 180/\[Pi], 360], "\[Phi]"}, 0, 360,
Manipulator[
Dynamic[\[Phi], ({x, y} =
vp[[1 ;; 2]] =
r {Cos[# \[Pi]/180],
Sin[# \[Pi]/180]} Sin[\[Theta] \[Pi]/180]; \[Phi] = #) &], #2,
Appearance -> "Labeled"] &}, {{r, Norm[{1.3, -2.4, 2.0}], "r"}, 0, 9,
Manipulator[
Dynamic[r, ({x, y, z} =
vp = # {Sequence @@ ({Cos[\[Phi] \[Pi]/180],
Sin[\[Phi] \[Pi]/180]} Sin[\[Theta] \[Pi]/180]),
Cos[\[Theta] \[Pi]/180]}; r = #) &], #2,
Appearance -> "Labeled"] &}, {{vp, {1.3, -2.4, 2.0}, "ViewPoint"},
InputField[
Dynamic[vp, (\[Theta] =
Mod[ArcTan[#[[3]], Norm[#[[1 ;; 2]]]] 180/\[Pi], 180]; \[Phi] =
Mod[ArcTan[#[[1]], #[[2]]] 180/\[Pi], 360];
r = Norm[#]; {x, y, z} = vp = #) &]] &}, {{vv, {0., 0., 1.},
"ViewVertical"}, None},
Initialization :> (g = Plot3D[Cos[x + Cos[y]], {x, -Pi, Pi}, {y, -Pi, Pi}])]

Hope this helps...

"Dr. Robert Kragler" <kragler@hs-weingarten.de> wrote in message
news:kjgo10$pui$1@smc.vnet.net...
>
> Hi,
> in Mathematica V 5.2 there was a useful graphics tool being envoked by
Menu >
> Input > *3D ViewPoint Selector*. With this interactive palette/notebook
one
> could easily determine the Cartesian or Spherical coordinates (i.e.
{theta, phi,
> r} resp. {x,y,} ) of a wireframe cube and then paste these values for the
> optimized view of the rotated cube into another Mathematica graphics.
>
> Unfortunately this tool became obsolete from version 6.0. on (which is
mainly
> due to the fact that 3D graphics can be manipulated interactively in
higher
> Mathematica versions.) Nevertheless, in order to determine the optimum
viewpoint
> coordinates I sometimes miss this tool. And I just searched in the
installation
> tree structure of Mathematica V5.2 (and higher versions too) for a
notebook
> resp. palette with the name 3DViewPointSelector (or similar) but could not
find
> this tool even in V5.2. Of course, one could write a litte application
with
> Manipulate for rotating a wireframe cube and read out the viewpoint
coordinates.
> But if this tool already exists why do additional efforts...
>
> Does anyone know where to look for this nice graphics tool which (if
available)
> would certainly be applicable in other Mathematica versions too. Help
would be
> appreciated.
>
> Thanks  R. Kragler
>
> -- 
> Prof. Dr. Robert Kragler
> Email : kragler@hs-weingarten.de
> URL :   http://portal.hs-weingarten.de/web/kragler
>


[toc] | [prev] | [next] | [standalone]


#14057

Fromawnl <awnl@gmx-topmail.de>
Date2013-04-05 02:29 +0000
Message-ID<kjlcue$b5k$1@smc.vnet.net>
In reply to#14031
Hi,

> in Mathematica V 5.2 there was a useful graphics tool being envoked by Menu >
> Input > *3D ViewPoint Selector*. With this interactive palette/notebook one
> could easily determine the Cartesian or Spherical coordinates (i.e. {theta, phi,
> r} resp. {x,y,} ) of a wireframe cube and then paste these values for the
> optimized view of the rotated cube into another Mathematica graphics.
>
> Unfortunately this tool became obsolete from version 6.0. on (which is mainly
> due to the fact that 3D graphics can be manipulated interactively in higher
> Mathematica versions.) Nevertheless, in order to determine the optimum viewpoint
> coordinates I sometimes miss this tool. And I just searched in the installation
> tree structure of Mathematica V5.2 (and higher versions too) for a notebook
> resp. palette with the name 3DViewPointSelector (or similar) but could not find
> this tool even in V5.2. Of course, one could write a litte application with
> Manipulate for rotating a wireframe cube and read out the viewpoint coordinates.
> But if this tool already exists why do additional efforts...
>
> Does anyone know where to look for this nice graphics tool which (if available)
> would certainly be applicable in other Mathematica versions too. Help would be
> appreciated.

There are many different ways how this could be realized with newer 
versions. Here is a palette that copies the ViewPoint of the currently 
selected Graphics3D to the clipboard:

CreatePalette[Button["Copy Viewpoint",
   Replace[
    Cases[NotebookRead[SelectedNotebook[]], _[
      ViewPoint, _], \[Infinity]],
    {v : (ViewPoint -> _)} :> CopyToClipboard[v]
    ]
   ]]

  If nothing is selected or the selection is not a Graphics3D (or 
contains exactly one of those) it won't change the clipboard content...


hth,

albert

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web