Shadows?

231 views
Skip to first unread message

Jared Moore

unread,
May 16, 2013, 2:08:36 PM5/16/13
to vpytho...@googlegroups.com
Hello,

I've been looking for a lightweight visualization system and VPython looks great!  Is there functionality for shadows implemented anywhere in the system?  Some of the demos appear to have them, but I'm not seeing it in the documentation.  Perhaps I'm not looking under the right terms?

Thanks!

Bruce Sherwood

unread,
May 17, 2013, 4:20:38 AM5/17/13
to vpytho...@googlegroups.com
No, VPython does not have any support for shadows. It does support shading, so that faces of objects have different brightnesses depending on their positions and the positions of the lights. It is possible that in the future VPython will support shadows, if and when VPython graphics is extended to take advantage of the GPUs in modern graphics cards.

The only shadow-related aspect of VPython is that in the Contributed section of vpython.org there is a module for exporting a VPython scene to the Pov-ray ray tracer application, which can produce (not in real time) visualizations that include shadows.

GlowScript (glowscript.org) is a browser-based programming environment similar to VPython which uses the WebGL 3D library built into modern browsers, a library similar to OpenGL. WebGL requires the use of GPUs and as a result already handles pixel-level transparency whereas the transparency calculations in VPython necessarily give incorrect displays when objects intersect. David Scherer experimented with shadows in GlowScript but that work was never completed. I hope some day to return to that feature, as the algorithm is somewhat related to the algorithm already in use for transparency.
Reply all
Reply to author
Forward
0 new messages