★ Anaglyphs: MGgr3DConverter and MGgrWindow3D
posted Fri 16 Jun 2006 by Michael Galloy under IDL, Object graphicsAnaglyphs are 3D images made from stereographic image pairs and viewed with red-blue glasses. I have a destination class, MGgrWindow3D
, for the object graphics system that will automatically produce anaglyphs from regular 3D object graphics hierarchies (but not 2D plots and images). I’ve seen anaglyphs which are able to maintain color information; I might try to update the code to allow for that, but right now everything ends up greyscale.
It’s easy to use MGgrWindow3D
to make anaglyphs. Simply make the object graphics hierarchy and then use a MGgrWindow3D
object as the destination:
owindow = obj_new('MGgrWindow3d')
owindow->draw, oview
The only special code for making an anaglyph in a widget program is the use of the classname
keyword:
draw = widget_draw(tlb, xsize=400, ysize=400, graphics_level=2, $
/motion_events, /button_events, $
classname='MGgrWindow3D', uname='draw')
The CLASSNAME
keyword was undocumented for a while, but has been officially documented since IDL 6.2.
Code for making anaglyphs:
MGgr3DConverter__define.pro (doc)
This code does the heavy lifting of producing left and right eye images and combining them.
MGgrWindow3D__define.pro (doc)
A drop-in replacement for IDLgrWindow that produces anaglyphs instead of regular output.
mg_3d_demo.pro (doc)
A demo of producing an anaglyph.
mg_3dwidget_demo.pro (doc)
A demo of producing an anaglyph in a draw widget.
April 25th, 2007 at 8:41 pm
[…] Check out my article “Anaglyphs: MGgr3DConverter and MGgrWindow3D” for an easy way to make similar images from object-graphics scenes. […]
December 3rd, 2007 at 7:25 am
Michael,
This very cool and easy to use. The results have been impressive — a great way to engage people during a brief. They really get everyone’s attention.
BTW I went down to the local Wahlgreens and picked up 50+ pair of blue green glasses for free. They were left over from a “Regis and Kelly” Halloween special that was broadcast in 3D. Good source of free glasses if you don’t mind the graphics on the glasses.
Thanks again for a neat IDL tool.
Bill
December 3rd, 2007 at 2:04 pm
That’s cool; I’ve been trying to find a cheap way to acquire enough to hand out during a presentation. I’ll have to keep an eye for special like that.
March 2nd, 2010 at 5:10 pm
[…] display (simple anaglyph system, I also have code for using Alioscopy’s autostereoscopic monitors from IDL object graphics […]