HoloDraw Program Documentation: drawmash

Documentation | Download | Examples | Frequently Asked Questions (FAQ)

Program Summary

Filename drawmash.pl
Author Marvin Simkin
Program Created 2005-03-03
Last Updated Apr 1 15:16
Purpose rearrange a drawfile to reduce redundancies
syntax drawmash.pl < big.draw > mashed.draw
big.draw draw instructions that are too complex to render quickly
mashed.draw those same instructions, in a hopefully more efficient form

Discussion

At present this only searches for many POINTs that have the same color,
and outputs them all as a single point: object.
Whether or not it improves rendering performance is up to the browser.

In extreme cases this has been observed to reduce the final VRML file size
by a factor of 4 to 5, and double or triple rendering speed in Cosmo Player
and Cortona. It may also make it possible for more complex images to be
loaded, which otherwise would have crashed the browser. For example, a file
with 100,000 point: instructions crashed Cortona, but 3,000,000 point:
instructions could be loaded in Cortona on the same PC after drawmash.pl!

BUGS:
Because this accumulates and sorts points by color in memory, if you
create a very large hash entry (e.g. 3 million points) it can cause perl
to abort with an "Out of memory!" error.
We hope to avoid this by setting a limit of 10,000 points per color.


Written by Marvin Simkin
Filename drawmash.html
Last updated April 5, 2005
Arizona State University Valid HTML 4.01!
Freedom to Choose ANY Browser