Skip to content

Latest commit

ย 

History

History
115 lines (78 loc) ยท 2.94 KB

File metadata and controls

115 lines (78 loc) ยท 2.94 KB

๐Ÿš€ 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.