Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!riley From: riley@batcomputer.tn.cornell.edu (Daniel S. Riley) Newsgroups: comp.graphics Subject: Re: MTV-Raytracer on ATARI ST Message-ID: <7511@batcomputer.tn.cornell.edu> Date: 7 Mar 89 17:50:21 GMT References: <1171@laura.UUCP> Reply-To: riley@tcgould.tn.cornell.edu (Daniel S. Riley) Organization: Cornell Theory Center, Cornell University, Ithaca NY Lines: 24 In article <1171@laura.UUCP> wagener@unidocv.UUCP (Roland Wagener) writes: >I have ported the MTV-Raytracer on the ATARI ST using the Turbo-C- >Compiler. The Program works fine and it uses about 3 hours CPU-Time >to create the Balls-Picture in 320x200 Resolution. >But there is a bug somewhere in the program. There are white spots in >all reflecting surfaces. This bug does not apear on a IBM-PC programmed >with Zortech-C++. But the PC needs 5 hours for a 200x200-Picture ... This sounds like a floating point precision problem. I've been playing with a number of ray tracers, including MTV, on my Amiga. I've seen white spots and other sorts of splotches if I use the Motorola ffp format floating point routines, which are single precision (32 bit) only. They go away if I use IEEE math libraries (all calculations done with 64 bit doubles). 3 hours cpu for a 320x200 picture on an 8 MHz 68000 sounds like single precision to me, but I don't know the ST or Turbo-C that well. I suppose there must be papers on controlling round-off errors in ray tracing algorithms, but none of the ray-tracers I've seen make any special efforts in that regard. Of course, all the ones I have source code to are meant to be clean and simple, not fast and convoluted...:-) -Dan Riley (riley@tcgould.tn.cornell.edu, cornell!batcomputer!riley) -Wilson Lab, Cornell U.