raytracer fr eine sphere ist fertig, aber das gerenderte bild sieht komisch aus, als wrden zeilen verschoben werden und keine kugel ist zu erkennen. ausserdem gibt es jetzt vektor operationen wie das skalarprodukt.

This commit is contained in:
any
2026-07-26 17:54:45 +02:00
parent 361eaefdb5
commit 72d683c1f2
11 changed files with 150 additions and 14 deletions
+8 -2
View File
@@ -1,3 +1,4 @@
#pragma once
struct vec3 {
double x, y, z;
};
@@ -15,7 +16,7 @@ struct ray {
struct sphere {
vec3 origin;
int radius;
double radius;
}; typedef struct sphere sphere;
struct camera {
@@ -25,4 +26,9 @@ struct camera {
double width;
double resolutionX;
double resolutionY;
}; typedef struct camera camera;
double screenDistance;
}; typedef struct camera camera;
struct rgba {
double r, g, b, a;
}; typedef struct rgba RGBA;