More
This commit is contained in:
parent
71bfdf18c0
commit
c50997144b
4 changed files with 10 additions and 2 deletions
1
README.md
Normal file
1
README.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Based on the article https://raytracing.github.io/books/RayTracingInOneWeekend.html
|
|
@ -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
6
src/ray.zig
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
const vec3 = @import("vec3.zig");
|
||||||
|
|
||||||
|
pub const ray = struct {
|
||||||
|
origin : vec3.point3,
|
||||||
|
dir : vec3.vec3,
|
||||||
|
};
|
|
@ -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;
|
Loading…
Reference in a new issue