Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!rutgers!mcnc!rti!tachyon!sch From: sch@tachyon.UUCP (Steve Holzworth) Newsgroups: comp.graphics Subject: Bug in Mark's RayTracer Keywords: raytracer bug Message-ID: <190@tachyon.UUCP> Date: 30 Sep 88 07:07:32 GMT Organization: William G. Daniel & Associates, Cary, N.C. Lines: 20 There is a bug in the screen.c routine of Mark's raytracer. Specifically, everywhere he does a malloc, the code is of the form: foo = (Pixel *) malloc (xres * sizeof (Pixel)) + 1; The actual intent is to allocate xres+1 Pixels, thusly: foo = (Pixel *) malloc ((xres + 1) * sizeof (Pixel)); There are three occurences of the former in the code; they should be changed similarly to the later. (Note: I never ran over this bug until I tried to run a 1024x1024 image. It worked fine on 512x512 or less images.) Other than that, its a good raytracer. Congrats, Mark! I'm working on a better lighting model and a better camera model. I'll send them on when (if) I finish them. Steve Holzworth rti!tachyon!sch