Greetings, Scratcher Move with the arrow keys. Change the slider that appears when you hover your mouse over the top of the canvas to change the number of objects in the scene. Ray Marching finds where the ray (blue) collides with an object (white). It does this by calculating the shortest distance to the objects in the scene (orange) and then moves along the ray with that distance. This ensures that the ray never goes past said intersection. Ray marching is often used to simulate light in photorealistic rendering. Ray casting works the same way with the exception that the step size is constant; ray marching is therefore generally faster.
All code by me, @CasTur Kind of inspired by Jamie Wong: http://jamie-wong.com/2016/07/15/ray-marching-signed-distance-functions/