MathGroup Archive 2007

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

Search the Archive

Re: Connecting 3D graphs together

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81366] Re: [mg81322] Connecting 3D graphs together
  • From: Chris Hill <chill at wolfram.com>
  • Date: Thu, 20 Sep 2007 03:57:58 -0400 (EDT)
  • References: <200709190928.FAA01387@smc.vnet.net>

At 04:28 AM 9/19/2007, michael.p.croucher at googlemail.com wrote:
>Hi all
>
>Say I have 2 3d plots:
>
>graph1 = Plot3D[Exp[-(x^2+y^2)],{x,-2,2},{y,-2,2}];
>graph2 = Plot3D[x*Exp[-(x^2+y^2)],{x,-2,2},{y,-2,2}];
>
>and I put them together in a GraphicsRow:
>
>GraphicsRow[{graph1,graph2}]
>
>I can select each of the 2 plots with my mouse and rotate them
>independently.  Is there any way I can connect them together such that
>if I click on graph2 and rotate it with my mouse then graph1 rotates
>in the same way?
>
>Best Regards,
>Mike

I recommend using Dynamic to link the view options of both graphics 
to the same variables.  As one of the graphics is rotated, the 
updated values of the options will be automatically written to the 
variables which will cause the other graphic to update accordingly.

DynamicModule[{viewpoint = ViewPoint /. Options[Graphics3D],
                viewvertical = ViewVertical /. Options[Graphics3D]},
  GraphicsRow[
   Show[#, ViewPoint -> Dynamic[viewpoint],
      ViewVertical -> Dynamic[viewvertical]] & /@ {graph1, graph2}]]

Chris Hill
Wolfram Research 



  • Prev by Date: Manipulate[] CreateDocument[] BUG ???
  • Next by Date: Re: Problem when NIntegrate matrix
  • Previous by thread: Connecting 3D graphs together
  • Next by thread: Re: Connecting 3D graphs together