                        3D Object Viewer Screen Saver
                        =============================

                           Written By Steven De Toni
                          ---------------------------

WHAT IS IT
----------
This program is a screen saver for the Windows interface systems
(i.e. 3.1, 95). It allows the user to select and view any number
(memory available) of 3D objects. The cost of this program is CARD-WARE or
EMAIL-WARE; send me a Postcard/Email from where your are in the world.

Features:
      - Able to define your own 3D object and include it into your system,
        separate 3D modelling system required.
      - Implements some ultra fast 3D calculation algorithms.
      - Implements a fast (depending on object locations on screen)
        screen updating algorithms. Updating speed is limited to how fast
        your system is in calculating complex 3D objects, and how fast
        your Windows video card is ... faster the better!
      - Very easy to use, this is why there is no help file :-); that and I
        could be bothered with it.


SPEED COMPARISONS
-----------------
A couple of speed figures for you:
On a 33mhz 486 with very fast local video bus card, 800*600*256, Windows 95.
Update cube at about 15-20 fps.

On a 75mhz Pentium with average video card, 800*600*256 Windows 95.
Update cube at about 17-25 fps. Additional increments of objects
(i.e. 5 objects on screen) didn't deter calculation speed. Video
bus speed was this bottle neck in this case.

Your mileage may vary.
        

INSTALLATION
-------------
Place/copy the file 'steve3D.scr' into Window's System directory.
Place the 3D object files '*.3d' into a separate directory or into
the Window's system directory. Configure the screen saver to load a 3D
image from the control panel and save your settings. 

3D OBJECT FILE DEFINITION
-------------------------
The 3D data files define how a 3D is viewed on screen, 3D objects are
made up of vertices (points) and polygons (connected points > 1). The 3D
object file reads the 3D objects as fixed point coordinates, so no floating
point coordinates are allowed. As a result I've written a converter program
to convert from floating point to fixed point numbers. However this program
was intended for a old 3D modelling program I have for my Amiga. Your
modelling program differ some what from my programs txt output.

The 3D data file is made up in the following format:
#  = Number
*  = Remark
,  = Separte value.

***** Format *****
#,                     * Vertice number

#, #, #                * Vertice X, Y, Z world cordinates

#,                     * Number of polygons for object

#, #, #, #, ...        * First # defines number of indexes to the vertice
                       * list, followed by the vertice indexes and finally
                       * the polygon colour.

#,                     * Number to indicate if object is convex, or wireframe
                       * 0 = wireframe, non-zero (1) = convex.

===== Source Example =====
*** Object definition file ***
*  OBJECT (PYRAMID):
5,  * Number of vertices in object.

    * Vertices list for object.
    -40, 40 , -40, * Vertex #0
    40 , 40 , -40, * Vertex #1
    0  , -40, 0  , * Vertex #2
    40 , 40 , 40 , * Vertex #3
    -40, 40 , 40 , * Vertex #4

5,  * Number of polygons for object 0

    * Polygons for object.
    3, 1,2,0,   1,
    3, 3,2,1,   2,
    3, 4,2,3,   3,
    3, 0,2,4,   4,
    4, 4,3,1,0, 5,

1,  * Yes, it's a convex polyhedron
===== End Of Source =====

CODE
----
All code provided with this screen saver is public domain (aren't I nice),
that is to say you can use it to extend this screen saver if you so desire.
The code is simple enough to follow, and I've haven't used any nasty
techniques that shouldn't be hard to follow. All 3D object calculations
use fixed point math, and as such have there limitation. It shouldn't be to
hard to convert these back to floats (i.e. basically removing the '<< SHIFT',
'>> SHIFT' and replacing the longs with floats). Only a basic back face
removal is implemented, so only convex shaped can be polygon filled,
but such is life.

All code should be pretty much portable to any system with only the drawing
functions needing to be change (not much of task).

I used the Turbo C++ compiler (V3.1), and as such the code compiled is
probably only 8088, but this can be remedied by re-compiling it with your
own instruction set for your computer.
