Skip to content

Instantly share code, notes, and snippets.

@qrohlf
Created June 24, 2013 19:16
Show Gist options
  • Save qrohlf/5852656 to your computer and use it in GitHub Desktop.
Save qrohlf/5852656 to your computer and use it in GitHub Desktop.
Synchronize two Mathematica plots angle and position so they can be simultaneously rotated with the mouse
from: http://mathematica.stackexchange.com/questions/5375/extract-current-viewing-parameters-from-a-3d-view/5377#5377
{vp, vv} = Options[Graphics3D, {ViewPoint, ViewVertical}][[All, 2]];
Grid[{{Graphics3D[Cuboid[], ViewPoint -> Dynamic[vp],
ViewVertical -> Dynamic[vv]],
ParametricPlot3D[{Cos[u], Sin[u] + Cos[v], Sin[v]}, {u, 0,
2 Pi}, {v, -Pi, Pi}, ViewPoint -> Dynamic[vp],
ViewVertical -> Dynamic[vv]]}}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment