Implementation of a 2D ray caster.
- Window: It is the area which will hold all the other entities, including our light source and boundaries.
- Boundaries: These are randomly generated lines placed within the window area that will act as the obstructions for light.
- Particle: This is a circle that projects lines in all 360 degrees. These lines are rays and the particle acts as our light source.
- Rays: These are lines projected from the particle which act as light rays.
User can use arrow keys to move the light source around and visualise the interactions.
Make sure you have Go installed
-
Clone the repository
-
Cd into the repository
-
Run go build
-
Run ./2dRaycasting or 2dRaycasting.exe based on your system.