Rats! Guile raytracer

Felipe Tavares <[email protected]> Tue, 14 Jul 2026 00:47:28 +0000
Newsgroups gmane.lisp.guile.user
Message-ID <CdxEfaH3v-WeVHb9PxBmdv6SYIPAQju0Vsw-BaVfTwYxcCO7B1AIxnE-zXSjMlCm-u7Z5jP-XXKTStcyKfPpt_nplzrMJHNJJ-obw106Ego=@pm.me>
Hi all,

https://git.sr.ht/~felipetavares/rats

I wrote a raytracer in Guile over this past weekend, and week prior that, r=
eally. Thought it might interest some of you.

It contains a simple Wayland client, largely based on the work from Philipp=
e Gaultier (https://gaultier.github.io/blog/wayland_from_scratch.html). It =
is mostly self-contained in the wayland/ subdirectory, and depends only on =
libc for some syscalls.

Other than that it's just a standard basic raytracer, mostly built out of g=
uess work and Wikipedia. These are the pages I had open after finishing:


-   https://en.wikipedia.org/wiki/Ray_tracing_(graphics)
-   https://en.wikipedia.org/wiki/Reflection_(mathematics)
-   https://en.wikipedia.org/wiki/Snell's_law#Vector_form
-   https://en.wikipedia.org/wiki/Specular_reflection
-   https://en.wikipedia.org/wiki/Line%E2%80%93plane_intersection
-   https://en.wikipedia.org/wiki/Line%E2%80%93sphere_intersection
-   https://en.wikipedia.org/wiki/Matrix_multiplication
-   https://simple.wikipedia.org/wiki/Dot_product


Of course, coupled with the Guile reference manual itself: https://doc.guix=
.gnu.org/guile/latest/en/guile.html.


Best,
Felipe