- A python raycasting demo using p5py
- This is a port based off of the javascript implementation shown here: https://www.youtube.com/watch?v=TOEi6T2mtHo&t=1708s
- This should be (it isn't because unlike p5js, its not built ontop of the skia engine) more performant however than the video, I noticed there were a number of duplicate heavy calculations being made in the video which have been fixed here.
- Python 3
- Glfw: install it using this link: https://p5.readthedocs.io/en/latest/install.html#installing-p5
- absl-py
- p5py
- make sure you are using pip for python 3
- run the following command:
# installs the requirements for the program
pip install -r requirements.txt --user
# use the mouse as input
python3 main.py
# automatically move the source particle
python3 main.py --auto
# set number of rays to 36, the smaller the number, the more performant
python3 main.py --rays 36