A 3D wireframe renderer built in C, capable of transforming 2D coordinate grids into immersive 3D landscapes. This project explores the fundamentals of Linear Algebra, Isometric Projections, and the Bresenham Line Algorithm.
-
Coordinate Transformation: Implements rotation matrices and isometric projection formulas to map 3D points (
$x, y, z$ ) onto a 2D screen ($x', y'$ ). - Bresenham's Algorithm: Optimized line drawing to connect vertices with smooth, alias-free segments.
-
Memory management: Robust parsing of
.fdffiles, handling massive corrdinate grids without memory leaks. - Real-time interaction: Fast rendering loop using MiniLibX to allow fluid transformations.
To achieve the "iron wire" look, the engine applies an isometric transformation where the angles between the
$$x_{iso} = (x - y) \cdot \cos(0.523599)$$
$$y_{iso} = (x + y) \cdot \sin(0.523599) - z$$
| Action | Key |
|---|---|
| Elevation | E(Up)/ Q(Down) |
| Zoom | W(In)/S(Out) |
| Rotation | A/D(Y-Axis) |
| Navigation | Arrow Keys |
| Quit | ESC |
- Clone & Compile:
# Bash
git clone git@github.com:erwkuvi/FdF-Wireframe.git
make
- Run with a map:
# Bash
./fdf test_maps/mars.fdf
