A collection of C projects focused on 2D and 3D simulations. Each project builds and runs independently.
A spinning 3D cube rendered in the terminal with ASCII characters. Uses 3D rotation, perspective projection, and a depth buffer to draw the visible faces.
Build and run on macOS or Linux with a C compiler, starting from the repository root:
cd spinning_cube
cc cube.c -o cube -lm
./cubeUse a terminal that supports ANSI escape sequences with room for 160 columns
and 44 rows. Press Ctrl+C to stop.
A 3D particle simulation built with C and raylib. Particles rain into a dotted sphere, collide, and settle under gravity. Supports up to 350 particles, with click spawning and an interactive camera.
Build and run on macOS with Homebrew and a C compiler, starting from the repository root:
brew install raylib pkgconf
cd particle_simulation
cc -O2 -std=c11 -Wall -Wextra main.c $(pkg-config --cflags --libs raylib) -o particle_simulation
./particle_simulation- Left-click an empty spot inside the sphere to add a particle.
- Right-drag to orbit the camera; scroll to zoom.
- Press
Spaceto pause or resume,Rto reset, andEscapeto close.
See the project README for physics details and limitations.

