This project aims to represent the wire mesh of a map in 3D.
Example of a Conical representation.
The objective is to create graphically the schematic representation in “wireframe” (or "Fil de Fer" in French) of a map in relief by connecting different points (x, y, z) by segments.
The coordinates of the map will be stored in a file passed in parameter, here is an example with the map "42.fdf":
Each number corresponds to a point in space:
- The horizontal position corresponds to its abscissa.
- The vertical position corresponds to its ordinate.
- The value corresponds to its altitude.
By executing the command ./fdf 42.fdf
, we should see something similar to the picture below.
A minimal of two projections were expected.
In my case, three types of projections are included in the program:
- Isometric
- Parallel
- Perspective
This project use the "MinilibX" library.
The installation process include the compilation from sources, the linking and the creation of the static library.
Some external packages can be necessary, depending on your OS: https://github.com/42Paris/minilibx-linux
A MacOs version is included in the "lib" folder. In this case, update the makefile for "minilibx-macos".
Create or update the "fdf" program from sources.
make
Recompile completely the program.
make re
Delete object files created during installation.
make clean
Delete object files but also the compiled program.
It will not affect the source code.
make fclean
./fdf test_maps/42.fdf
./fdf -h
More screenshots are available in the "screens" folder.
I recommand to use the "clang" compiler because "gcc" generates linking error with the minilibx.
Check that clang compiler is installed on your system.
If there is permission issue:
chmod 774 lib/minilibx-linux/configure
Simple graphics library
Plot of segments
Events
3D to 2D projection