A simple 3D wireframe renderer that transforms height maps into 3D landscapes
FdF (Fil de Fer) is a graphics project that renders wireframe models from height maps. The program takes a 2D grid of numbers as input, where each number represents the height of a point, and transforms it into a 3D wireframe representation. This project is developed as part of the 42 school curriculum and serves as an introduction to graphics programming.
- ✅ 3D wireframe rendering of height maps
- ✅ Custom colors from map file
- Clone the repository:
git clone https://github.com/ondbeh/fdf.git
- Navigate to the project directory:
cd fdf - Compile the project:
make
- GCC compiler
- Make
- MLX42 library (included ad a submodule)
- X11 libraries (for Linux) or Cocoa (for macOS)
Run the program with a map file:
./fdf maps/42.fdfThe map file is a text file with a grid of numbers, where each number represents the height of a point:
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 10 10 0 0 10 10 0 0
0 0 10 10 0 0 10 10 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Optional color values can be specified in hexadecimal after each height value:
0,0xFFFFFF 0,0xFFFFFF 0,0xFFFFFF
0,0xFFFFFF 10,0xFF0000 10,0xFF0000
0,0xFFFFFF 0,0xFFFFFF 0,0xFFFFFFThis project is licensed under the MIT License - see the license file for details.

