Re: How does one fix a Graphics3D display?
- To: mathgroup at smc.vnet.net
- Subject: [mg113666] Re: How does one fix a Graphics3D display?
- From: Joe Gwinn <joegwinn at comcast.net>
- Date: Sat, 6 Nov 2010 05:02:21 -0500 (EST)
Chris, At 8:14 AM -0500 11/5/10, Chris Hill wrote: >At 07:42 AM 11/5/2010, Joe Gwinn wrote: >The actual code used is: > >>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},ControllerLinking->False} >>] >>] > >I think you have a typo there. Your ControllerLinking option >specification is inside the ViewVector option RHS so it is not being >interpreted as a Graphics3D option. Ahh. Right you are. Wonder why Mathematica didn't complain that ViewVector was mangled. Now the box stays put and the sphere flys correctly. I've added nonlinear handling of the velocity signal from the SpaceNavigator, so I can both creep and run. Here is the code: DynamicModule[{x=0,y=0,z=0}, Graphics3D[ {Dynamic[Text[ToString[{x,y,z}],{0,0,10}]],Sphere[Dynamic[{x,y,z}+={100,100,-100}ControllerState["SpaceNavigator",{"X Axis","Z Axis","Y Axis"}]^7],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}},ControllerLinking->False] ] Next step will be to add a vector to the sphere, with the vector pointing angle controlled by twisting the SpaceNavigator knob. This completes the metaphor of 3D mice, that one manipulates the knob as one would manipulate the object if one were able to grab the object by hand. Thanks, Joe