Skip to content

ondbeh/fdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 FdF - 3D Wireframe Renderer

License Stars Issues 42 Project

A simple 3D wireframe renderer that transforms height maps into 3D landscapes

📋 Table of Contents

📖 Overview

FdF (Fil de Fer) is a graphics project that renders wireframe models from height maps. The program takes a 2D grid of numbers as input, where each number represents the height of a point, and transforms it into a 3D wireframe representation. This project is developed as part of the 42 school curriculum and serves as an introduction to graphics programming.


✨ Features

  • ✅ 3D wireframe rendering of height maps
  • ✅ Custom colors from map file

🎮 Demo

FdF Demo - 42 map FdF Demo - fractal map

🔧 Installation

  1. Clone the repository:
    git clone https://github.com/ondbeh/fdf.git
  2. Navigate to the project directory:
    cd fdf
  3. Compile the project:
    make

Requirements

  • GCC compiler
  • Make
  • MLX42 library (included ad a submodule)
  • X11 libraries (for Linux) or Cocoa (for macOS)

📚 Usage

Run the program with a map file:

./fdf maps/42.fdf

Map Format

The map file is a text file with a grid of numbers, where each number represents the height of a point:

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 0 10 10 0 0 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

Optional color values can be specified in hexadecimal after each height value:

0,0xFFFFFF 0,0xFFFFFF  0,0xFFFFFF
0,0xFFFFFF 10,0xFF0000 10,0xFF0000
0,0xFFFFFF 0,0xFFFFFF  0,0xFFFFFF

🤝 Contributing


📞 Contacts

GitHub

Email

LinkedIn


📜 License

This project is licensed under the MIT License - see the license file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published