[Shootout-list] Ray tracer

Jon Harrop jon@ffconsultancy.com
Mon, 13 Jun 2005 01:38:58 +0100


On Monday 13 June 2005 01:17, Isaac Gouy wrote:
> The "feature request" has been marked closed.

Ah, ok.

> Everyone is able to "contribute programs" for ray-tracer in the usual
> way.
>
> You may contribute new "optimised versions" in the usual way.

Shall I resubmit my programs then?

> Maybe you'd like to contribute some text to help others implement
> ray-tracer, for inclusion on the shootout webpage.

I think my original description on the feature request was quite good:

"A cut-down sphere-flake ray tracer: 
 
 http://www.ffconsultancy.com/free/ray_tracer/comparison.html 
 
 This program generates and ray traces a scene containing a large number of 
spheres (1,365 by default), outputting a greyscale PGM file. In order to ray 
trace the scene efficiently, the spheres are clustered into groups which each 
have a spherical bounding volume. If a ray does not intersect the bounding 
volume of a group then it cannot intersect any of the spheres within that 
volume. This test is used to greatly accelerate rendering by culling large 
numbers of spheres from tests when tracing rays."

The more recent implementations are also heavily commented. At only 60 LOC, 
the original OCaml is better than any textual description.

> Would it be better to wait for a MLton expert to contribute a program?

Given that my Mlton implementation is already faster than all others, I think 
it is ok to include it as is.

Hopefully that will stop Simon from claiming on newsgroups that Intel Fortran 
is the fastest implementation. ;-)

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists