[Shootout-list] Ray tracer

Sebastien Loisel Sebastien Loisel <sloisel@gmail.com>
Wed, 27 Apr 2005 20:56:55 +0200


Jon,

It's a nice program but it's not yet shootoutified. I think if you rip
out the ground, the opengl, the color and simplify some of the code
you can get it quite a bit smaller. I'd be interested.

Sebastien Loisel

On 4/27/05, Jon Harrop <jon@ffconsultancy.com> wrote:
>=20
> I've knocked up a little ray tracer to see if it is feasible to get one i=
n the
> shootout. I think it'll take quite a bit of work to cut it down to be sma=
ll
> enough. My current attempt (222 LOC in OCaml but with lots of dandy featu=
res)
> is on-line here:
>=20
>   http://www.ffconsultancy.com/free/ray_tracer/
>=20
> I must say that I'm stunned at how effective this little OCaml program is=
! :-)
>=20
> Anyway, I think an interesting quirk to be to allow the scene to be lazil=
y
> evaluated in a functional language. With 7 levels of spheres, giving abou=
t
> 600,000 objects, a lot of time is spent generating (and probably traversi=
ng)
> a huge data structure. This is silly though, because there's no need to
> explicitly calculate anything.
>=20
> I'd like to hear people's comments.
>=20
> --
> Dr Jon D Harrop, Flying Frog Consultancy Ltd.
> Objective CAML for Scientists
> http://www.ffconsultancy.com/products/ocaml_for_scientists
>=20
> _______________________________________________
> Shootout-list mailing list
> Shootout-list@lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/shootout-list
>