|
From: John B. <jgb...@ch...> - 2005-01-23 19:05:45
|
FYI, anyone trying to do real 3D stereo:
There is a nifty simple "kludge" that gives stereo without additional code.
You must of course use two side-by-side windows, with the usual
"scene=display(title..."(etc.) code.
First window's "center=" numbers should be (0.35,0,0)
Second window's "center=" numbers: (0,0,0)
This will very slightly offset one window's contents from the other's, but
it also gives real 3D depth to what's in the scene. The 'camera' apparently
shifts somewhat in the 'x' direction, which is enough to do the necessary
brain-fooling trick. ( IOW, I don't know _why_ this works, only that it
_does_ work.)
To increase or decrease the apparent depth ("hyperstereo" or less depth),
slightly increase or decrease the first number ("0.35" in the above
example).
To invert the stereo (use "walleyed" freeviewing instead of crosseyed
feeviewing), make that number negative.
Now, I can't guarantee that it'll work properly with just _every_
conceivable object or set of objects, but it works perfectly with my
particular object-set, which is a grouping of small spheres being compressed
together inside an invisible larger sphere.
I discovered this when trying to learn to use VPython, and having enormous
difficulty trying to find and use code that would give me stereo. VPython's
windowing system is probably not _designed_ to do this, but it does do it,
and does it without a shred of "stereo-specific" additional code.
Just passing learned stuff to the list.
Thank me only if you a) want to do stereo, and b) try it and it works for
you as well.
(*grin*)
John Brawley
|