From: Bruce S. <bas...@un...> - 2003-09-19 20:17:15
|
As you know, John Zelle recently contributed code to support 'active' stereo (with shutter glasses) and 'passive' stereo (the two views are sent to two computer projectors which place polarized right-eye and left-eye views on a screen, to be viewed with polarized glasses). He also put hooks into the code to support 'redblue', the kind of stereo which one views with cheap red-blue glasses. However, the implementation was incomplete in that it required that you convert all object colors to grayscale for it to work. I've completed the implementation by doing the grayscale conversion automatically. If you print some object.color, you won't see any change; the conversion is done internally before displaying in red or blue. So you can now say scene.stereo = 'redblue' (or 'redcyan' or 'yellowblue') and get stereo with no special computer equipment. There is a new Windows installer available at http://vpython.org. Linux/Unix installer should follow in a day or two. The grayscale conversion is this: s = ( .299 * r**GAMMA + .587 * g**GAMMA + .114 * b**GAMMA ) ** (1/GAMMA) color = (s,s,s) This makes different colors show up as different grays, which is desirable. But notice that if the original colors were red or blue, the resulting gray will be rather dim. To get a brighter object in redblue stereo, use white as the original color. I've just ordered some glasses from http://www.tedpella.com/photo_html/stereo.htm. A box of 10 red-blue glasses is $4.50. Bruce Sherwood |