Re: Rats! Guile raytracer

Matt Wette <[email protected]> Mon, 27 Jul 2026 17:05:31 -0700
Newsgroups gmane.lisp.guile.user
Message-ID <[email protected]>
On 7/13/26 5:47 PM, Felipe Tavares wrote:
> Hi all,
>
> https://git.sr.ht/~felipetavares/rats
>
> I wrote a raytracer in Guile over this past weekend, and week prior that, really. Thought it might interest some of you.
>
> It contains a simple Wayland client, largely based on the work from Philippe 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 guess 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
>

If you are interested, I wrote similar project.
The only C code is to implement mmap, sendmsg and recvmsg in guile.

https://github.com/mwette/guile-wl-play