Re: How does one fix a Graphics3D display? (Solved)
- To: mathgroup at smc.vnet.net
- Subject: [mg113667] Re: How does one fix a Graphics3D display? (Solved)
- From: Joseph Gwinn <joegwinn at comcast.net>
- Date: Sat, 6 Nov 2010 05:02:33 -0500 (EST)
- References: <ib0le7$gnc$1@smc.vnet.net>
I was contacted privately with a solution: Add the option ControllerLinking->False to the code below. I didn't think of this because the documentation made it sound like this would completely disconnect the SpaceNavigator from the DynamicModule, but this is misleading, as the direct use of ControllerState allows one to reach around the unlinking. Thanks to all, Joe Gwinn In article <ib0le7$gnc$1 at smc.vnet.net>, Joseph Gwinn <joegwinn at comcast.net> 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