This project is about creating a simple wireframe model representation of a 3D landscape by linking various points (x, y, z) with line segments (edges). The points are read from a .fdf file, which contains a Z-value (and a color in hexadecimal notation) for each grid-point.
- X Window System
- Raster Graphics
- Line Drawing Algorithms
- Vectors (Math)
- Transformation Matrices
- 3D Projection
MiniLibX for Linux requires xorg, x11 and zlib, therefore you will need to install the following dependencies: xorg, libxext-dev, zlib1g-dev and libbsd-dev.
For Debian/Ubuntu-based distros, run:
sudo apt update && sudo apt install xorg libxext-dev zlib1g-dev libbsd-devClone the repository:
git clone https://github.com/Breno-S/42_FdF.gitInside the project's directory, build the program:
make bonusCall the executable and pass the path to the fdf map as its argument:
./fdf maps/42.fdf
| Key | Action |
|---|---|
| Mouse-Wheel Up, Mouse-Wheel Down | Zoom |
| ESC | Close window |
| Key | Action |
|---|---|
| Mouse-Wheel Up, Mouse-Wheel Down | Zoom |
| W, A, S, D | Move |
| Q, E | Rotate around Z-axis |
| Numpad 2, Numpad 8 | Rotate around X-axis |
| Numpad 4, Numpad 6 | Rotate around Y-axis |
| Numpad 5 | Reset model orientation and position |
| + | Increase Z scaling factor |
| - | Decrease Z scaling factor |
| 0 | Reset Z scaling factor |
| ESC | Close window |