Skip to content
← Projects

3D Raycasting

February 13, 2020Yannick WeigertPascal
gelbeinhalb/raycasting-for-3d-renderingA raycaster in pythonPython

This project was created for a German student science competition where Pascal and I participated back in early 2020.

A picture of Pascal and me in 2020
A picture of Pascal and me in 2020

#Background

Sometime in 2019, Pascal brought up the idea of creating a raycaster to simulate a three-dimensional environment in Scratch, which is typically used to render 2D scenes. I got hooked on the idea, and we soon started working on it.

The main code block of the Scratch raycaster
The main code block of the Scratch raycaster

The result was a simple raycasting engine that could render a maze with walls and a player that could move around in the maze. As you can imagine, the Scratch performance was not great, but we learned a lot about raycasting and how it can be implemented.

Screenshot from the Scratch raycaster
Screenshot from the Scratch raycaster

This was enough to make us curious about how raycasting could be implemented in a programming language like Python. We then decided to re-write our engine and submit it as our science project for "Jugend Forscht", a German science competition for students.

For that we had to write a report on our project which we had to submit to their website.

#Report

The report is available here. The original German version can also be found as a pdf file on GitHub.

gelbeinhalb/raycasting-for-3d-renderingA raycaster in pythonPython

Documentation