Art, Rendering, Ray Tracing, Creative Coding, Graphics.
maxRayBounces = 3; const maxRayDistance = 1000; imagePlane.pixels.forEach(pixel => { const ray = castRay(pixel, camera); while (ray.distance < maxRayDistance && ray.bounces < maxRayBounces) { advance(ray); scene.geometry.forEach(shape => { const collision = collision(shape, ray); if (collision) {