I'm a maths undergraduate. This is a compendium of small programming projects I've been doing through the years, mostly early high-school experiments but things I'm working on now. Most of them are physics simulations, games and small tools, written in Python.
The repositories were uploaded recently, so their commit dates don't show when each project was written. Each README explains how the project works, how to run it and what is still unfinished.
|
A 3D renderer written from scratch, without any graphics or 3D library. It implements its own vector and matrix classes, rotation matrices and perspective projection, and lets you fly a camera around the scene with the keyboard and mouse. Related: Geometry Viewer 3D, a 3D point viewer built on its own vector and matrix classes. Python · Pygame |
|
A mass–spring simulator with its own physics module: point masses connected by damped springs, gravity and semi-implicit Euler integration. The demo shows a chain of 51 masses swinging between two heavy anchors.
Python · Pygame |
|
|
A version of the arcade game written in a single Pygame file, with inertial ship movement, missiles, screen wrap-around and asteroids that split into smaller pieces when hit. The ship and asteroids are drawn from vertex lists in polar coordinates rather than sprites.
Python · Pygame |
Ragdoll Physics An interactive 2D ragdoll built from point masses, rigid distance constraints and spring–damper joints, integrated with position Verlet. The figure can be dragged, thrown and pushed. Python · NumPy · Pygame |
Soft Body Sim A soft-body simulation: a ring of point masses in which every pair is joined by a damped spring, deforming under gravity when it hits the floor. Python · Pygame |
Elastic Ball Collisions Elastic collisions between balls of different masses, with each impact resolved along the line joining their centres. Python · Pygame |
Rocket Orbit Sim A rocket launched from a real-scale Earth under Newtonian gravity, with steerable thrust, zoom and a live prediction of its trajectory. Python · Pygame |
Also: N-Body Gravity, a gravitational simulation of a star, a planet and its moon, each attracting the others.
Minecraft 2D A side-view block sandbox with procedurally generated terrain, gravity and collisions, block placement and removal, and TNT explosions. Python · Pygame |
Parabola Targets A physics puzzle game: launch a projectile with a slingshot-style control and get it past the obstacles into the target, across several levels. Python · Pygame |
Tetris A Tetris clone with the seven tetrominoes stored as 5 × 5 matrices, precomputed rotations, soft drop and line clearing. Python · Pygame |
Terminal Minesweeper Minesweeper played in the terminal, with a configurable board size and number of mines and a breadth-first flood fill that opens empty regions. The interface is in Spanish. Python |
|
Screen Explainer A desktop utility started with a global hotkey. The selected region of the screen is sent to the Gemini API, and the explanation appears in a floating window (illustration). Python · PyQt6 · Gemini API |
Snake Autoplayer A bot that plays a browser Snake game by reading the screen and sending keystrokes. It alternates between two fixed routes that together cover the whole board (one is shown above). Python · Pillow |
Also: Image Grid Splitter, a utility that splits an image into a 4 × 4 grid for printing it as a poster.










