The attached script contains another approach to the
process of displaying images in VPython. Instead of
there being an object for each "pixel," two triangles
on a faces object are placed together to produce a
square, as noted in the appropriate comment lines. As
with my "objects" example, I kept this prototype as
simple as possible; there are many things that could
be done with varying normals, z-axis-positions, &c
that I haven't touched yet.
The new "faces" algorithm delivers the image to the
screen significantly more quickly than the "objects"
system, and it seems to be able to handle much higher
resolution pictures; still, I suggest beginning your
experiments with small bitmaps to play it safe.
As always, feedback is encouraged.
Joel
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com |