This commit is contained in:
Michael Zhang 2022-01-04 02:29:43 -06:00
parent 71bfdf18c0
commit c50997144b
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
4 changed files with 10 additions and 2 deletions

1
README.md Normal file
View file

@ -0,0 +1 @@
Based on the article https://raytracing.github.io/books/RayTracingInOneWeekend.html

View file

@ -1,4 +1,5 @@
const std = @import("std"); const std = @import("std");
const vec3 = @import("vec3.zig");
pub fn main() anyerror!void { pub fn main() anyerror!void {
const stdout = std.io.getStdOut().writer(); const stdout = std.io.getStdOut().writer();

6
src/ray.zig Normal file
View file

@ -0,0 +1,6 @@
const vec3 = @import("vec3.zig");
pub const ray = struct {
origin : vec3.point3,
dir : vec3.vec3,
};

View file

@ -1,4 +1,4 @@
const vec3 = struct { pub const vec3 = struct {
x: f64, x: f64,
y: f64, y: f64,
z: f64, z: f64,
@ -12,4 +12,4 @@ const vec3 = struct {
} }
}; };
const color = vec3; pub const color = vec3;