MathGroup Archive 2011

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

Search the Archive

Re: Explicitly specifying the 3d viewing options (pan, rotate, etc.)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121875] Re: Explicitly specifying the 3d viewing options (pan, rotate, etc.)
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Wed, 5 Oct 2011 04:04:03 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j6e684$ke8$1@smc.vnet.net>

Theo Moore wrote:

> Hi,
>
> I'm looking for an easy way to specify the 3d viewing options that you
> can alter by clicking a 3d plot and dragging your mouse. For example,
> plot a graph using:
>
> Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}]
>
> And then click and rotate it (or click and zoom in/out, etc.). Is
> there a way to output the parameters which were used as I manually
> rotated it, so that one could duplicate this (now-changed) graphic
> from an explicit command?
>

You may use the following function:

getViews[pic_]:=
Flatten[Union[Extract[pic,Position[pic,#]]&/@
  {ViewPoint->_, ViewCenter->_, ViewVertical->_,
   ViewAngle->_, ViewVector->_, ViewRange->_}]];

To apply it, do the following:
Drag, rotate, ... your pic until it looks like you want.

Then enter getViews[] in a new cell, paste the pic between the brackets
and evaluate.

-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de



  • Prev by Date: Dynamic evaluation not automatically enabled in CDF documents
  • Next by Date: Re: Explicitly specifying the 3d viewing options (pan, rotate, etc.)
  • Previous by thread: Re: Explicitly specifying the 3d viewing options (pan, rotate, etc.)
  • Next by thread: Re: Explicitly specifying the 3d viewing options (pan, rotate, etc.)