A Raytracer written in Go following the Raytracing in a weekend book
Find a file
2024-01-26 17:55:10 +00:00
.gitignore .gitignore aktualisiert 2024-01-25 19:27:15 +00:00
image.ppm First chapter done 2024-01-25 20:43:02 +01:00
LICENSE Initial commit 2024-01-25 08:12:45 +00:00
main.go First chapter done 2024-01-25 20:43:02 +01:00
README.md README.md aktualisiert 2024-01-26 17:55:10 +00:00

RaytracerGO

A raytracer and renderer writen in Go (Golang) following the book Raytracing in one weekend

Motivation

I've been meaning to tinker with graphics for quite a while and was motivated by a video programming a raytracing algorithm on a TI-84. Back in my school days I used to love to tinker with the TI-84 and also did some very elementary programming on it myself.

Video that started it all: Raytracing on a Graphing Calculator (again)

TI-84 Raytracing

Why Go?

The story starts with Zig. A few colleagues of mine and I tried to work on a Guake-like browser using Zig. We chose Zig because it's C-like, modern and because their mascot is a lizard, of course. But I don't like Zig all that much, and right now Go has caught my attention.

I like the language a lot, it's still very C-like, doesn't have classes :), is open-source and resembles Python a lot, while still being fast and having crazy fast compiling speeds (which is something I've started to appreciate since dabbling with Linux From Scratch). The only draw back of Go is that it is a little bit slower than C++, but I just want to experience what the Python-version of C is like :)

Go-Programming

Taglibro

Chapter 1: The PPM-image format

First PPM image

Yay this is the first image I've ever generated without using any external imported library ^^

Chapter 2: Vector operations: Ditching OOP for GO

Implemented the vec3 Class and colour utility functions without classes. Struktoj estas sufiĉa.