Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to find current ViewAngle, ViewPoint during Rotating graphics?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98613] Re: How to find current ViewAngle, ViewPoint during Rotating graphics?
  • From: "Alexander Elkins" <alexander_elkins at hotmail.com>
  • Date: Tue, 14 Apr 2009 06:17:21 -0400 (EDT)
  • References: <7274943.1239523349775.JavaMail.root@n11> <003101c9bb6e$d3c92020$7b5b6060$@net> <grupsu$rp$1@smc.vnet.net>

Here I've incorporated your 3D plot into my example. I've made the tube
optional since it slows things down. Note that
ViewPoint->{3.38378, 0, 0} with ViewVertical->{0,1,0} gives you a
"spring" which is oriented sideways.

Manipulate[
ParametricPlot3D[{Sin[u], Cos[u], 0.05*u}, {u, 0, 5*2*Pi},
PlotStyle -> If[tube, Tube[0.05], Automatic], Axes -> Dynamic[axes],
Boxed -> Dynamic[boxed], ImageSize -> 300, ViewPoint -> Dynamic[vp],
ViewVertical -> Dynamic[vv], ViewAngle -> Dynamic[va],
ViewCenter -> Dynamic[vc], SphericalRegion -> Dynamic[sr],
Method -> {"RotationControl" -> Dynamic[rc]}], {{vp,
ViewPoint /. Options[Graphics3D], "ViewPoint\[Rule]"},
InputField}, {{vv, {0, 0, 1}, "ViewVertical\[Rule]"},
InputField}, {{va, Automatic, "ViewAngle\[Rule]"},
InputField}, {{vc, {{1/2, 1/2, 1/2}, {1/2, 1/2}}, "ViewCenter\[Rule]"},
InputField},
Row[{Labeled[Checkbox[Dynamic[sr]], "SphericalRegion\[Rule]", Left,
Spacings -> 0],
Labeled[Checkbox[Dynamic[axes]], "Axes\[Rule]", Left, Spacings -> 0],
Labeled[Checkbox[Dynamic[boxed]], "Boxed\[Rule]", Left, Spacings -> 0],
Labeled[Checkbox[Dynamic[tube]], "Tube\[Rule]", Left,
Spacings -> 0]}], {sr, {True, False}, None}, {axes, {False, True},
None}, {boxed, {False, True}, None}, {tube, {False, True},
None}, {{rc, "ArcBall", "RotationControl\[Rule]"}, {"ArcBall", "Globe"}}]

Enjoy!
Alexander

"Nasser Abbasi" <nma at 12000.org> wrote in message
news:grupsu$rp$1 at smc.vnet.net...
>
> From: "David Park" <djmpark at comcast.net>
>
>
> > Make a Plot, say,
> >
> > Plot3D[(x - 3) (y - 2), {x, 0, 5}, {y, 0, 5},
> > ImageSize -> 300]
> >
> > Then in the output, position the cursor to the left of the plot and type
> > 'AbsoluteOptions['. Next position the cursor to the right of the plot
and
> > type ',ViewPoint]'. Evaluate and you will obtain the current ViewPoint.
> > You
> > can rotate the image and reevaluate to get the new ViewPoint. Then copy
> > the
> > ViewPoint into the original plot statement.
> >
> > Without the ImageSize option it also works but I get warning messages
> > after
> > rotating.
> >
> >
> > David Park
> > djmpark at comcast.net
> > http://home.comcast.net/~djmpark/
> >
> >
>
> Thanks David, but the above does not seem to work on my plot. I am using
> this 3D plot
>
> ParametricPlot3D[{Sin[u], Cos[u], 0.05*u}, {u, 0, 5*2*Pi}, PlotStyle ->
> {Tube[thick]},
>   ViewPoint -> {2.645, 2.057138, 0.468316}, ViewAngle -> Automatic,
Axes ->
> False, Boxed -> False,
>   ImageSize -> 300]
>
> And the above ViewPoint value was copied as a result of the method you
> described, yet the resulting image orientation does not match that which I
> copied the ViewPoint from.
>
> Here is a screen shot.
>
> http://12000.org/tmp/041209/viewpoint.PNG
>
> Basically, I am trying to make a "spring" which is oriented sideways
instead
> of up-down.
>
> This is on Mathematica 7
>
> ps. You are right above getting a warning when not using ImageSize.
>
> --Nasser
>
>
>




  • Prev by Date: Re: Should I be using Mathematica at all?
  • Next by Date: Re: Should I be using Mathematica at all?
  • Previous by thread: Re: Re: How to find current ViewAngle, ViewPoint during Rotating graphics?
  • Next by thread: Re: How to find current ViewAngle, ViewPoint during Rotating graphics?