Skip to content

leifekstromclark/ray-marching-and-signed-distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ray-marching-and-signed-distance

This is a ray cast algorithm that uses ray marching. It repeatedly calculates the distance to the nearest obstacle then takes a step of that length. When the distance to the nearest obstacle is 0 it has hit its target! The code includes signed distance functions for circles, axis-aligned rectangles, and capsules.

Visual Demonstration

pygame.window.2022-08-24.21-04-25.mp4

About

Ray marching algorithm for ray casts. Implemented in Pygame.

Topics

Resources

Stars

Watchers

Forks

Languages