From 7f8d412d8bfa0ad823ea788a7c8dc8015d36e781 Mon Sep 17 00:00:00 2001 From: zymon Date: Tue, 23 Jan 2024 22:50:51 +0100 Subject: [PATCH] poprawka w PinHoleCamera --- SimpleRayTracer.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}