diff --git a/src/raytracer_nim.nim b/src/raytracer_nim.nim index f7e5d9c..bf2ba60 100644 --- a/src/raytracer_nim.nim +++ b/src/raytracer_nim.nim @@ -1,4 +1,4 @@ -import "./tuple", "./canvas", "./matrix", "./transformations", math +import "./tuple", "./canvas", "./transformations", math type Projectile = object @@ -34,11 +34,10 @@ proc clock() = var world = canvas(200, 200) var p = point(0.0, 0.0, 1.0) let colour = colour(1, 1, 1) - let oneHourRotation = rotationY(PI / 6) for i in 0..11: let target = p.scale(60.0, 0.0, 60.0).translate(100.0, 0.0, 100.0) world.writePixel(target.x, target.z, colour) - p = oneHourRotation * p + p = p.rotateY(PI / 6) writeFile("clock.ppm", world.toPPM()) when isMainModule: