From 0371842a000c7fbd4433d597cc66d0dd0c8371d6 Mon Sep 17 00:00:00 2001 From: Turingon Date: Tue, 27 Feb 2024 13:10:04 +0000 Subject: [PATCH] README.md aktualisiert --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4ab2a7e..b5d6db1 100644 --- a/README.md +++ b/README.md @@ -39,20 +39,20 @@ To understand computer graphics better I will try to describe some important def By the end of this chapter I generated the following background: -Second PPM image +Second PPM image ### Chapter 4: Creating a sphere In this chapter I created a simple sphere and detect its surface by solving quadratic equations, which represent vectors. The sphere has no shading yet: -Second PPM image +Second PPM image ### Chapter 5: Surface normals The first part of the chapter was the calculation and visualization of the normals, which we need for shading. But I also implemented the [fast inverse square algorithm](https://youtu.be/p8u_k2LIZyo) in Go just like in Quake III, which is pretty clever and fast. I did primarily because 1) I'm working with 32-bit floats for the sake of memory efficiency and 2) I don't care about accuracy - also it's very educational. But [as explained in this video](https://youtu.be/tmb6bLbxd08) the fast inverse square isn't always the better choice and in my case it probably isn't, because I need to import a Go standard library to disable data type safety and processor padding (something I've noticed when working with small data types in Zig). This is the first visualization of the normals of the sphere: -Second PPM image +Second PPM image The second part of the capter involved standardizing the code so that it can process multiple objects - it was quite translating this part into Go, as a lot of C++ OOP features are missing - but finally I managed to produce this neat output: -Second PPM image \ No newline at end of file +Second PPM image \ No newline at end of file