diff --git a/README.md b/README.md new file mode 100644 index 0000000..2dda5a4 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Based on the article https://raytracing.github.io/books/RayTracingInOneWeekend.html diff --git a/src/main.zig b/src/main.zig index 6531f74..1f1d0f7 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1,4 +1,5 @@ const std = @import("std"); +const vec3 = @import("vec3.zig"); pub fn main() anyerror!void { const stdout = std.io.getStdOut().writer(); diff --git a/src/ray.zig b/src/ray.zig new file mode 100644 index 0000000..055b22d --- /dev/null +++ b/src/ray.zig @@ -0,0 +1,6 @@ +const vec3 = @import("vec3.zig"); + +pub const ray = struct { + origin : vec3.point3, + dir : vec3.vec3, +}; diff --git a/src/point.zig b/src/vec3.zig similarity index 81% rename from src/point.zig rename to src/vec3.zig index 10f8f12..d05b99a 100644 --- a/src/point.zig +++ b/src/vec3.zig @@ -1,4 +1,4 @@ -const vec3 = struct { +pub const vec3 = struct { x: f64, y: f64, z: f64, @@ -12,4 +12,4 @@ const vec3 = struct { } }; -const color = vec3; +pub const color = vec3;