A simple 3D height-map renderer. You can rotate models, color is defined by relative height in the map.
fdf (which stand for "fil de fer" in French or Wire frame) is the first graphic project in UNIT Factory (42) using minilibx (Minilibx is a very basic graphical library writting in C used in UNIT Factory (42)).
The program take a map as arguments which content different number as their height and render it in 3D. Mandatory part is just rendering and expose hook. All the other features are bonus.
- Rotation X Y Z
- Color gradients
- Height modification
- Onscreen telemetry
- Window autosized from the map size
- Map zoom according to the map size
Run make
. An executable will compile. Currently only tested on OS X.
Run it with ./fdf [map]
. A bunch of sample maps are provided in the maps
directory.
Example (./fdf maps/42.fdf ):
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 0 0 0 0 0 0
0 0 10 10 0 0 10 10 0 0 0 10 10 10 10 10 0 0 0
0 0 10 10 0 0 10 10 0 0 0 0 0 0 0 10 10 0 0
0 0 10 10 0 0 10 10 0 0 0 0 0 0 0 10 10 0 0
0 0 10 10 10 10 10 10 0 0 0 0 10 10 10 10 0 0 0
0 0 0 10 10 10 10 10 0 0 0 10 10 0 0 0 0 0 0
0 0 0 0 0 0 10 10 0 0 0 10 10 0 0 0 0 0 0
0 0 0 0 0 0 10 10 0 0 0 10 10 10 10 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 0 0 0 0 0 0 0 0