POV-Ray : Newsgroups : povray.off-topic : 99 lines of C++ for an unbiased ray tracer : Re: 99 lines of C++ for an unbiased ray tracer Server Time
4 Sep 2024 15:20:05 EDT (-0400)
  Re: 99 lines of C++ for an unbiased ray tracer  
From: Invisible
Date: 14 Jan 2010 05:43:49
Message: <4b4ef565$1@news.povray.org>
Darren New wrote:

> Cute. Hard to read, but cute. :-)

Wait... THE WALLS ARE GIANT SPHERES?! o_O

Well that's *one* way to cut down the code size... No ray/plane 
intersection test to code.

44:  double n=sizeof(spheres)/sizeof(Sphere);

Well... that's... one way to figure out how big an array is. :-.

Evidently my C++ is weak, but... how is

53:  Vec nl=n.dot(r.d)<0?n:n*-1;

different from "nl = -abs(n.dot(r.d))"?

Also, where THE HELL is "Xi" defined? I can see it *used* in several 
places, but I can't find a definitions.

Line 79 means each row of pixels is computed in parallel, right?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.