Re: How does one fix a Graphics3D display?
- To: mathgroup at smc.vnet.net
- Subject: [mg113662] Re: How does one fix a Graphics3D display?
- From: Chris Hill <chill at wolfram.com>
- Date: Sat, 6 Nov 2010 05:01:36 -0500 (EST)
Try using the option ControllerLinking->False with your Graphics3D to
prevent Mathematica from trying to interpret the controller input as
instructions to change the view.
Chris Hill
Wolfram Research
At 05:14 AM 11/5/2010, Joseph Gwinn wrote:
>I'm using a 3dconnexion "SpaceNavigator" 3-D mouse (works like the old
>SpaceBall joystick), and am running into an annoying problem. I have a
>simple DynamicModule that accepts and integrates the XYZ inputs from the
>SpaceNavigator, and uses the integral to move a little sphere around in
>a 3D box. So far so good. But I cannot get the box to stay still.
>Matheamtica keeps trying to help me by recomputing what it thinks is the
>best way to view the scene, which leads to disorienting jumps in the
>box and the viewpoint.
>
>So, the question is how to convince Mathematica to keep the box fixed and let
>the little sphere fly around within this cage? I have tried many
>variations of the View* options, to no avail.
>
>
>For the record, here is some sample code. You will need some kind of 3D
>controller for this code to work.
>
>DynamicModule[{x=0,y=0,z=0},
>Graphics3D[
>{Dynamic[Text[ToString[{x,y,z}],{0,0,10}]],Sphere[Dynamic[{x,y,z}+=
>{1,1,-1}*ControllerState["SpaceNavigator",{"X Axis","Z Axis",
>"Y Axis"}]],0.35]},PlotRange->{{-10,+10},{-10,+10},{-10,+10}},
>Axes->True,Ticks->False,AxesLabel->{"x","y","z"},ViewPoint->Front,
>ViewVertical->{0,0,1},ViewCenter->{0,0,0},ViewVector->{{0,30,0},{0,-1,0}}
>]
>]
>
>
>Thanks in advance,
>
>Joe Gwinn