home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-04-29 | 2.0 KB | 52 lines | [TEXT/KAHL] |
- ***** A Hackers Guide to Tracer *****
- tracer consists of a bunch of files containing a program that does
- ray tracing (No shit sherlock).
- Thes files are as follows:
- tracer.c: main() sets up the initial rays and stores values
- in a file. booboo prints an error message and quits.
- shade.c: shade() calculates the intensity returned by a ray. It is
- recursive, and also makes a call to refract().
- refract.c: The most difficult part of the program. This file contains
- refract(), inside(), refk() and getcapt().
- and these do all the refraction calculations.
- find.c: contains find(),findo() (for when a ray is inside a ball)
- and shadow() and finds() for shadows.
- support.c: supportive subroutines. right now only contains mt_vec
- as all the others were either discarded or converted to
- macros.
- g_bal.c g_bal() gets the ball data and points bl[] at them.
- g_bod.c g_bod() loads the floor pattern into suzie.
-
- macros.h contains all the macro definitions. Definitely to be looked at.
- rtd.h header file containing all the structure definitions.
- extern.h keeps track of all global variables used through the program.
-
- bdata.i sample ball data file.
-
- pat.def \
- check.pat\
- susie.pat >- sample pattern files. (susie is not for the purient).
- ship.pat /
-
- ******************************************************************
-
- 28/4/89
- -------
- Code posted to comp.sources.misc or unix late last year. Author unknown.
- Port to the Mac by John Lim (jkjl@munnari.oz) , picture drawing code
- by Jason Castan (castan@munnari.oz). Programs require M68881 and Color
- QuickDraw to run. Source requires LSC 3.0 to compile.
-
- New Files
- ---------
- drawit.c Draws data found in data.dis on a Mac with colour QD.
-
- Changes to code
- ---------------
- 1. LSC 3.0 "unix main.c" file used. Sorry we cannot distribute it
- for copyright reasons.
- 2. Added support for background processing under MF.
- 3. Changed all malloc(int) calls to malloc(long) calls.
- 4. Added M68881 support (castan).
- 5. Rewrote some of the expressions to generate (slightly) faster code
- on the LSC NON-OPTIMIZING compiler (hint-hint THINK) !