Fdf

Fdf is a program that reads a file containing height map data and generates a 3D wireframe model of the terrain depicted in the file. The program is written in C and uses the MiniLibX graphic library.

The height map file is a text file that contains a grid of numbers, with each number representing the height of a point on the terrain. The program reads this data and uses it to generate a 3D wireframe model of the terrain. The program displays the model in a new window using the MiniLibX graphic library.

The program supports a number of different features, including the ability to rotate and zoom in/out of the model, color gradients to represent changes in elevation, and the ability to change the projection type between parallel and isometric. The user can control the program using various keyboard commands, such as arrow keys to rotate the model and +/- keys to zoom in/out.

Fdf is a great project for learning about 3D graphics programming and developing skills in C programming. The project is also a good opportunity to explore the MiniLibX library, which is a simple but powerful graphic library that is often used in educational settings.

The Fdf project was created as part of the curriculum for 42, a software engineering school. The project requirements and specifications can be found in the en.subject.pdf file in the project repository.

Installation

To install and run Fdf, follow these steps:

Clone the project repository to your local machine. Install the MiniLibX library using the instructions provided in the minilibx folder. Compile the project using the make command. Run the program using the following command:

./fdf [map file]

Replace [map file] with the path to the file containing the height map data. The program will generate a 3D wireframe model of the terrain in a new window.

Features

Fdf supports the following features:

  • 3D wireframe model of terrain
  • Ability to rotate and zoom in/out of the model
  • Color gradients to represent changes in elevation
  • Ability to change the projection type (parallel or isometric)

Controls

Use the following keys to control the Fdf program:

Arrow keys: Rotate the model +/- keys: Zoom in/out of the model 1/2 keys: Switch between parallel and isometric projections ESC key: Close the program

Examples

Here are some examples of the output generated by Fdf:

Example 1

./fdf test_maps/julia.fdf

Example 2

./fdf test_maps/julia.fdf

Resources

The Fdf project was created as part of the curriculum for 42, a software engineering school. For more information about the project requirements and specifications, see the en.subject.pdf file in this repository.