[comp.binaries.atari.st] v01i008: mwc:low:uue;arc PEARLE - a raytracing animation program, Part04/04

atari-sources-request@daisy.UUCP (10/21/87)

Submitted by: Allen King <imagen!ucbvax!bfly-vax.bbn.com!aking>
comp.binaries.atari.st: Volume 1, Issue 8
Archive-name: pearle1/Part04



+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
 [Editor's Note]

	 I haven't had the free time on my ST (sad to say) to spend the
 many hours needed to test this so i am going to have to take the author's 
 word that it works, I have tested the display program and it works.

 here's the checksums:

bytes =    31299(    31799)   cksm = 1051   pearle1.uaa
bytes =    31302(    31802)   cksm = 1153   pearle1.uab
bytes =    31302(    31802)   cksm = 3064   pearle1.uac
bytes =     6821(     6934)   cksm =  130   pearle1.uad

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

Jim,
	The following will be posted to comp.binary.atari.st when I figure
out how. (see recent posting to info-atari16) But till then here's an
early copy. This is an excerpt from the .doc file, but I put it here so
you won't have to de-uue&ark to read. Tell me if it is too long:

				Allen King  aking bfly-vax.bbn.com ucbvax


			PEARLE.PRG

   PEARLE.PRG renders 3-dimensional scenes in a world of reflective and 
refractive spheres, using ray tracing techniques. Movies formed from
sequences of frames can be generated, showing reflective balls linked and 
bouncing in a gravitational field. They resemble a string of bouncing pearles
-- hence the name.

   The amount of computation required to produce one ray traced image on
an ST is enormous -- it is measured in hours. To display animated movies,
images must be precomputed in (overnight) batch runs. PEARLE provides the 
ability generate sequences of images on disk in Degas PI1 format, for later 
replay by BLASTRAM.TTP (also included).

   The ray tracing heart of PEARLE was taken from net.sources, documented
Fredrich Knauss of University of California, San Diego. I've ported it to 
the ST, added animation, (primitive) color, and the various other features
you see here. I place PEARLE in the public domain, for non-comercial use only.

   PEARLE.PRG runs only on a color ST in low resolution. 1 Meg is required 
if resolutions greater than one ray per pixel or replaying movies from RAM 
is desired. Operation with only 512K will produced slightly aliased pictures
(one ray per pixel) which can be displayed staticaly, slowly from floppy, 
or from hard disk (if you have a disk blaster program).

   The rest of this document contains sections entitled Getting Started, 
Configuration File Format, and Checkpointing. The sources are available 
upon request. With enough interest I could post them.

table
 !"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
begin part d pearle1.uad
MAPV!@@81# !@"Q&  .]@$+81 // 73P@ '[P!%& !Z]P"^WA(#0   P2<7^1w
M*<%6)B] 88"0( @P!EH' !$ ")GP!VL  !/U$/@ 4Q"R UCT#[P08-*5$>'Qv
M%@$0$3=S2PV!"/^ " #@BT92.P4Q LVW6Q>T?U\89C^0-?GW)-VA/=#8)Z$Ru
M)L"0 +]@#ID$ ?@0 0=P2OJ2 />0#F[@ 9G A?H   4P'N!0$"RQ6UCU$+M%t
M/Q[ C @B!D\D4@ P#\ P [_P#( P!UD! ,B7% 8A,=Y '=\C54=T!__0@# Ps
M+)FR@'N((!GF$+-4:!CI > T +.'ALPB4Y8&C04%?UJQ/1^2#X-@ P-P P,0r
M U[ #Z<P!'GP"^WA 3] 0N_0'C^ #@D1""KS'UFQ,\_V;![C#R 0 (L' *BRq
M!L!P#<#0!W A@IPB@;3$)^=ADA\0 'CG  ' E</W(VFXAE%QE3UR(/I81GYAp
M7H=&.R9I@DS2)REVB27)?U%4#P!PCJ?Q!@) #+^P"X/P#H_P"!#07K'V"0@0o
M /0@ ..0*!ET-&(181\@!8#0",N1". P!?C0#N>0!-8$6'8A%8L'#P( %7_Vn
M(_P0#/+F#]'P#\%P>(?7'@7!@06A0090$.W!@8,$&'F1+%?QE79VAK(%""/Ym
M6#_4#P$P#@("!6  "C7  -7P/@@1!CG0"39 (OHR#K>320^Q#Z"P7\_U 3( l
M"LS@/F;V#R4 #YH #_X!C54S*DES!Y@&G !0/>TA,/D@A[TH1$+$G@5@&MC(k
MC"%9-4DQ#QTH#O_0"3RC(+]9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