> For the complete documentation index, see [llms.txt](https://42-guide.gitbook.io/42-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://42-guide.gitbook.io/42-guide/core-curriculum/rank-02/fdf.md).

# FDF

## Introduction

The **FDF** project introduces you to the world of basic computer graphics programming. Using the **MiniLibX** graphical library, you will develop a program that renders a **3D wireframe model** of a landscape in **isometric projection**. This project is an excellent opportunity to familiarize yourself with MiniLibX, learn the fundamentals of graphics programming, and understand how to manipulate and visualize points in 3D space. The goal is to create an interactive visual representation of the map, allowing for zooming, rotation, and manipulation.

By the end of this project, you will have built a program that:

* Reads data from `.fdf` files.
* Transforms the data into 3D coordinates.
* Projects it onto a 2D window for visualization.

### Common Instructions

Before diving into the specifics of the FDF project, ensure you adhere to the following general requirements:

#### Coding Standards

* Your project must be written in **C** and follow the **Norm** coding standard.
* All submitted code must be free of errors such as segmentation faults, bus errors, or memory leaks. Any such issues will result in a grade of zero.

#### Memory Management

* Properly free all dynamically allocated memory. No memory leaks are allowed.

## Mandatory Part

### Objectives

* **Program Name**: `fdf`
* **Files to Submit**: `Makefile`, `.h` header files, `.c` source files.
* **Arguments**: A `.fdf` file containing the coordinates of the landscape.

### External Functions Allowed

* **File Handling**: `open`, `close`, `read`, `write`.
* **Memory Management**: `malloc`, `free`.
* **Error Handling**: `perror`, `strerror`.
* **Program Termination**: `exit`.
* **Math Library Functions**: Use the `-lm` flag for compilation.
* **MiniLibX Library Functions**.
* **Custom**: `ft_printf` or an equivalent function coded by you.

### Authorized Libraries

* **libft**

### Description

This program generates a **wireframe model** of a landscape based on a `.fdf` file. The wireframe is rendered in **isometric projection**, providing a 3D representation on a 2D plane.

Here's a step-by-step guide to help you get started, including suggested algorithms and learning resources:


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://42-guide.gitbook.io/42-guide/core-curriculum/rank-02/fdf.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
