#raytracer

2026-01-18

Light Branch Flow. Stunning and at some point shows how is present in tsunami wave travel and lights caustics. I wonder if it should affect how a #raytracer calculates light paths.

youtube.com/watch?v=6aZ45RNHa6U

#light #branchflow #caustics #raytracing

Lord Doctor Olle Wollej@hachyderm.io
2025-12-17

Last year I started to implement the raytracer from the book The Ray-Tracer Challenge from Pragmatic Programmer by Jamis Buck. It describes all concepts very well, and the implementation is done through cucumber test cases, so it can be followed in any language you want.

raytracerchallenge.com/

My implementation is coded in Rust and renders the images using the game library Macroquad.
github.com/ollej/macroquad-ray

#Rust #RustLang #Macroquad #raytracer #gfx #RayTracerChallenge

Raytraced image of an icecream cone with three scoops of different colored icecream. It’s floating above an infinite checkered plane with a shadow of the cone.Raytraced image of three balls of different sizes and colors.Raytraced image of the Standord teapot in golden yellow floating above an infinite checkered plane where it casts a shadow.Raytraced image with several balls of different sizes. One has a mirror surface and another looks like it’s made of glass. Under them is an infinite checkered plane where the balls cast shadows.
Lord Doctor Olle Wollej@hachyderm.io
2025-07-28

The fifteenth chapter of the ray tracing book is a bit more exciting as it adds the triangle and smooth triangle shapes as well as a parser for OBJ files. This makes it possible to load 3D models and add them to the scene.

I also made an optimization to cache the inverse of the transformation matrix which sped up the calculations a lot.

Here is an image of a smooth high polygon version of the Utah Teapot.

#RayTracer #RayTracerChallenge #Rust #RustLang #PragmaticProgrammer #3DModel

A ray traced image of a shiny yellow teapot at an angle over an infinite checkered floor.A ray traced image of a reddish shape made up of a few triangles floating above a checkered floor.
Lord Doctor Olle Wollej@hachyderm.io
2025-07-28

I had to do a lot of refactoring of my ray-tracer to get Chapter 14 working where Groups are added. Making it possible to combine shapes and translate them at the same time.

The end result is not very exciting though. This is a hexagon made up of six cylinders as edges and six spheres as corners.

#RayTracer #RayTracerChallenge #Rust #RustLang #PragmaticProgrammer

A ray traced image showing a red hexagon shape at an angle over an infinite checkered floor.
Lord Doctor Olle Wollej@hachyderm.io
2025-07-23

In chapter 13 two more shapes are added to the ray tracer. A cylinder and a cone.

#RayTracer #RayTracerChallenge #RayTracing #Rust #RustLang #programming #book #PragmaticProgrammer

Six long cylinders of different colors are crossing each other ij a sort of star shape above a checkered plane.A yellowish cone with three spheres in the colors light yellow, light green and light red in the opening making it somewhat resemble an ice cream cone. Below it is an infinite checkered plane that slightly reflects the cone.
Lord Doctor Olle Wollej@hachyderm.io
2025-07-22

In the twelth chapter of the Ray-Tracer Challenge book I've added a new kind of shape: a cube. This new scene is created using only cubes that are scaled and translated to make different shapes.

#RayTracer #RayTracerChallenge #RustLang #Rust #Graphics #RayTracing

A ray traced image made up of only cubes. The floor is a checkered pattern, the walls are striped horisontally with yellow and cyan. In the middle of the image there is a red table with brown legs. There is a small purple box on top of the table. To the left of the table is a transparent cube standing on the corner. To the right are three different sized boxes in green, yellow, and purple. Against the right wall behind the table is a tall mirror that reflects the corner of the table and the transparent cube.
Lord Doctor Olle Wollej@hachyderm.io
2025-07-22

My progress has been a bit slower, but I've now finished chapter chapter 11 in the Ray-Tracer Challenge. My raytracer now has both reflection and refraction and it's possible to generate images with mirrored and transparent objects.

#RayTracer #RayTracerChallenge #RustLang #PragmaticProgrammer

A ray traced image showing a four spheres above a checkered plane stretching out in the distance. The spheres cast shadows and are reflected in the floor. In the middle of the image is a large sphere with a mirror surface that reflects the other spheres and the plane. To the left is a small yellow sphere. Behind and to the right of the large mirror sphere is a slightly smaller green sphere. To the right and partially in front of the green sphere is a medium sized transparent sphere. The green sphere and the checkered floor can be seen through the transparent sphere.
Lord Doctor Olle Wollej@hachyderm.io
2025-07-19

I've now finished the tenth chapter of The Ray-Tracer Challenge book from Pragmatic Programmer. This chapter implements multiple different types of patterns to apply to the objects. There are stripes, gradients, rings and a checkerboard pattern. Next up is the chapter on reflections and refractions which is very exciting.

#RayTracer #RayTracerChallenge #RustLang

A computer generated image with three balls. The large sphere in the middle has a striped gradient between red and greeen. The smaller sphere to the right has stripes of cyan and blue. The small sphere to the left is yellow and green. The floor is a checkerboard pattern, and the wall behind the spheres has rings of light and dark gray.
Lord Doctor Olle Wollej@hachyderm.io
2025-07-19

Chapter nine of the book The Ray-Tracer Challenge introduces a new kind of shape in addition to spheres: infinite planes. These can be used as floors and walls.

#RayTracer #RayTracerChallenge #RustLang

A computer generated image of three colored spheres above an infinite gray plane that extends in the distance.A computer generated image of three colored spheres above an gray plane with a different gray wall behind them.
Lord Doctor Olle Wollej@hachyderm.io
2025-07-18

Chapter 8 in The Ray-Tracing Challenge introduces calculating shadows which was not as hard as I thought it would be. Although I had to switch from f32 to f64 to get rid of artifacts.

#RayTracer #RustLang

Ray traced image of three spheres of different colors. The spheres are shaded and cast shadows on the ground.
Lord Doctor Olle Wollej@hachyderm.io
2025-07-17

I just finished following chapter 7 of the Ray Tracer Challenge book from Pragmatic Programmer. It is now possible to raytrace a scene with multiple objects.

#RustLang #Macroquad #RayTracer

A computer generated image showing three spheres of different colors and sizes.
Lord Doctor Olle Wollej@hachyderm.io
2025-06-13

Today I completed chapter 6 of the book The Ray Tracer Challenge from Pragmatic Programmer in Rust and Macroquad. My raytracer can now display a sphere with reflection. It takes about 200 seconds to generate an image of 1000x1000 pixels, so it isn't very efficient.

The book is great, it is very easy to follow, with cucumber tests describing what needs to be implemented and pseudo code for the algorithms so it can be implemented in any language.

pragprog.com/titles/jbtracer/t

#RustLang #RayTracer #Macroquad

Image showing a computer generated sphere. It's purple, with a white point, and a shadow to the bottom right.
2025-05-08

The amazing strategy of "rewriting the entire thing from scratch and hoping it's better the next time around" fixed a weird bug with my shadows for the #zig #raytracer. I also made normal shading toggleable! (the setting is hardcoded but a single variable change and recompile isn't too bad for now)

Full disclosure, I'm following the "Ray Tracing in One Weekend" (raytracing.github.io/) book online, but I'm rewriting everything in Zig, and adding my own stuff here and there.

#graphics

Three of my raytraced spheres, with significantly more natural looking shadows. The sphere on the left is a grey metal, the sphere in the middle is a matte blue, and the sphere on the right is a yellow/bronze metal. The ground is somewhere between lime green and yellow.The same image as before, but with normals used to shade the spheres. There are no shadows, and everything is a gradient, based off of distance.

If you built a Raytracer with a used Orbic, you can get a SIM card for a buck from Total by Verizon and have control over its use. The pcaps are more complete if you have an active sim card. #privacy #raytracer

A Total by Verizon sim card kit.
PlusPlusPixelPluspluspixel
2025-03-28

Working in the city library today 🤩 Some basic math library.

2024-12-13

If you like pictures, then here's the output from a #raytracer I wrote in 6 hours, last Friday, based on the book "Ray Tracing In One Weekend." I spent another afternoon faffing about to get an interface working, that showed each step of the process.

marquisdegeek.github.io/six_ho

Lord Doctor Olle Wollej@hachyderm.io
2024-11-01

I’ve finished the fourth chapter of the book The Ray Tracing Challenge using Rust and Macroquad. It was mostly implementing matrix transformations. To test them out, this is an image generated using the rotation transformation.

#Rust #RustLang #Macroquad #RayTracer

A black image with 12 small red squares positioned in a circle, at each hour on an imagined clock face.
Lord Doctor Olle Wollej@hachyderm.io
2024-10-05

I started following the book The Ray Tracer Challenge from The Pragmatic Programmer yesterday and I finished chapter two and finally got something on the screen. I'm implementing it in Rust with the game library Macroquad.

pragprog.com/titles/jbtracer/t

#RustLang #Macroquad #raytracer

A black image with red dots in a parabola from the lower left corner to the lower right corner.
2024-09-27

TheFatRat just dropped a new track, "Ray Tracer" with real 16-bit video game vibes. I think he referred to it as "melodic glitch hop."

I think it's cool.

Check it out here: thefatrat.ffm.to/chapter7

#NewMusic #TheFatRat #EDM #DanceMusic #RayTracer #Music

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst