Skip to content

mlesniak/go-raytracer

Repository files navigation

Overview

This is a simple raytracer based on the book (series) Raytracing in one weekend. In addition to the book which is rather short on the underlying mathematics I've used the famous, albeit difficult to obtain physically, An introduction to raytracing for theoretical concepts of raytracing.

The result is this raytracer written in Go which allows to produce images (which computation took around five minutes with sixteen cores) such as

Using a bit of Imagemagick's magic, we are able to create animations (computation time ca. 23 minutes with sixteen cores) such as

Concurrency support

The program is optimized for multicore machines, albeit we have a strange performance regression, i.e. larger machines with, e.g. 16 or 32 CPUs not all cores are fully utlilized -- which is rather strange given our approach of computing rows of the image concurrently.

Open topics

  • Cleanup and refactor code
  • Improve (parallel) performance / fix regression
  • Add scene description format
  • Add CLI options
  • Add support for triangles
  • Allow import (and raytracing) of arbitrary models based on triangles

Releases

No releases published

Packages

No packages published