Hi.

This is the third in a series of Stupid Picasso Tricks. ztriangles displays
random Gouraud-shaded triangles on a 24-bit 640x480 Picasso II screen.  The
difference between ztriangles and SPT #2, ftriangles, is that these triangles
are z-buffered.  For the graphics-impaired:  Cool, they look 3D!

ztriangles takes one parameter, the number of triangles to display.  The
default if no parameter is given is 10.  You can safely run it with a very
large number, as in 'ztriangles 1000000', and abort it when bored.  Any mouse
click or key should cause it to exit after the current triangle completes.

If you feed it a negative number, such as -100, it will run in performance test
mode.  In this mode, it may not be aborted.  To get results which may be fairly
compared, you should leave the Picasso screen in front until it's done.  With
a negative parameter, the random number generator with a constant, so as to get
reproducible results.  Note that with z-buffering and random depths, not all
triangles are drawn.  The more triangles you specify, the fewer that are drawn,
and the faster the performance looks.  With ztriangles, you're really measuring
triangle processing speed, not triangle drawing speed.

v1.0:
ztriangles -100
drew 100 triangles in 8.94 seconds, performance of 11.19 triangles/second
ztriangles -500
drew 500 triangles in 31.66 seconds, performance of 15.79 triangles/second

Many thanks to Steve Worley for pushing me out of my comfort zone.

Have fun!
_john

grieggs@netcom.com
johng@shell.portal.com
