|
From: Craig B. <cd...@gm...> - 2010-02-03 18:05:47
|
Okay, I stayed up way too late last night (er, this morning)
experimenting with vpython camera view-distance control, and have come
to the following conclusions (all relative to a scene containing a
fixed set of static objects):
1. There are two fundamental parameters involved:
eyeDistance = mag(scene.mouse.camera - scene.center)
range = scene.range
2. eyeDistance can only be changed via user zooming, using
mouse-middle dragging. Nothing the program does directly ever changes
it.
3. range can only be changed by the program. Nothing the user does
ever changes it.
This seems wildly counterintuitive, and I wasted a lot of time trying
to violate point 2 or 3. But all this seems quite solid.
So, as in your movecamera.py example, the only way to move the eye to
a known apparent viewpoint following user-induced changes to
eyeDistance is to change range proportionately, so that the two change
cancel out.
Is that a fair summary? Or am I missing something? And if any
vpython developers are listening, why isn't there a programmatic way
to change eyeDistance directly, as for other camera parameters like
"forward"?
--
Craig Berry - http://www.cine.net/~cberry/
"Lots of things in the universe don’t solve any problems, and
nevertheless exist." -- Sean Carroll
|