This is a raytracer in rust.
I am mostly following:
https://raytracing.github.io/books/RayTracingInOneWeekend.html
cargo run --release > image.ppm
Then you can view the ppm file in any ppm viewer (gimp or krita should work fine).
https://raytracing.github.io/books/RayTracingTheNextWeek.html
https://www.realtimerendering.com/raytracing/Ray%20Tracing_%20the%20Rest%20of%20Your%20Life.pdf