diff --git a/SimpleRayTracer.jl b/SimpleRayTracer.jl index 1aef867..5e77b00 100644 --- a/SimpleRayTracer.jl +++ b/SimpleRayTracer.jl @@ -49,7 +49,7 @@ function get_rays(camera::PinHoleCamera, resolution::Tuple{I, I}) where {I<:Inte X, Y = camera.size B = camera.base Nx, Ny = resolution - [Ray(origin, B*Vec3(x, y, -d)) for y = LinRange(Y/2, -Y/2, Ny), x = LinRange(-X/2, X/2, Nx)] + [Ray(origin, B*Vec3(x, y, -d)) for y = LinRange(Y/2, -Y/2, Ny), x = LinRange(X/2, -X/2, Nx)] end struct Ray{T<:AbstractFloat}