A simple 3D ray tracing engine rendered in the terminal using Notcurses.
This project implements a basic ray tracing algorithm to render 3D scenes in the terminal. It uses the Notcurses library for high-performance terminal graphics, allowing for interactive 3D visualization directly in the console.
- Real-time 3D rendering with ray tracing
- Interactive camera controls (keyboard and mouse)
- Support for various 3D objects: spheres, planes (including checkerboard), and boxes
- Basic lighting model with diffuse and specular shading
- Terminal-based graphics using Notcurses
Clone the repository and use nix to build.
git clone https://github.com/nemeott/ray-tracing.git
cd ray-tracing
nix-buildThis will create a result directory symlink containing the compiled binary.
Execute the compiled binary to start the simulation.
./result/bin/ray-tracingControls:
- WASD: Move camera
- Mouse/Arrow keys: Camera movement
- Space/X: Move up/down
- Q: Quit
MIT License
