How to Reduce the Size of the VRML File*
The original code used a 300 x 300 element array to form the surface.  The resulting VRML file of the surface is 12.4 MB.  Reducing the decimating the array to a 100 x 100 array reduces the size of the file by 9X to 1.4 MB, yet does not significantly degrade the quality of the surface.  However, additional decimation does reduce the quality.  For instance, a 30 x 30 array looks poor and is probably not worth the savings to create the 0.2 MB VRML file.

Click on each array size to see the quality.  The size of each file is listed to advise you of the time it will take to load.

30 x 30 (0.2 MB)        100 x 100 (1.4 MB)     100 x 100 gzipped (0.3 MB)       300 x 300 gzipped (2.1 MB)

POST-GENERATION TECHNIQUES TO REDUCE THE SIZE OF THE VRML FILE:

Two things can be done to reduce the size of the VRML files for faster downloading.

1) Remove the tabs which IDL generates at the front of the columns of data in the .wrl file.  The reduction in size is modest, e.g., 0.2 MB were trimmed off the 12.4 MB file in this example, but every little bit helps with large files.  To remove the tabs, create a script containing the following, in this case named "myfilter":

#! /bin/sh

sed 's/^    *//'     Note, between the ^ and the * you should type the tab key and nothing else

Then on the command line, you should type:
myfilter < filenamein.wrl > filenameout.wrl
The output file will have the tabs removed.  The ascii file won't be as pretty without the tabs, but it cause no problems for the browser, and does reduce the size of the file.

2) Gzip the .wrl file.  Simply type

gzip filename.wrl
and the file will be reduced by approximately 75%.  The procedure will append a .gz to the end of the filename.  This should be removed.  The browser will understand to decompress the file and doesn't need the additional information.

* The problem of large file size is inherent in VRML files, it is not particular to files generated by IDL.