Skip to content

๐Ÿ–ฅ๏ธ FdF - 42 Project FdF is a wireframe 3D renderer written in C using MiniLibX, featuring parametric line rendering ,and isometric projection, and events management. ๐Ÿš€

Notifications You must be signed in to change notification settings

elsayedamine/FDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ„ FDF โ€” Wireframe 3D Viewer

โ€œTurning simple coordinates into mountains of meaning.โ€

๐Ÿ“Œ Project Overview

FDF is a wireframe model renderer written in pure C using the MiniLibX graphics library. It takes a 3D map (represented as a grid of heights) and transforms it into a 2D isometric or parallel projection. This project is part of the 42 Network curriculum and focuses on low-level graphics rendering, mathematical projections, and event-driven architecture โ€” all from scratch.

What starts as a matrix of numbers becomes a living, breathing terrain in motion.


๐Ÿš€ Features

โœ… Isometric & parallel projection switching
โœ… Smooth zoom in/out using keyboard keys
โœ… Mouse-based navigation
โœ… Dynamic color gradients based on map values or user preferences
โœ… Real-time refresh on user interaction
โœ… Clean pixel-perfect rendering
โœ… Robust handling of malformed map files
โœ… Interactive mini-menu on the showing:

  • Current x-offset, y-offset, z-height
  • Zoom level, scale factor, rotation angle
  • User guide menu with instructions for keyboard and mouse controls for :
  • Rotation,
  • Scaling,
  • Height adjustment;

๐Ÿ› ๏ธ Technologies & Concepts

  • C (ISO C90) โ€” all logic implemented from scratch
  • MiniLibX โ€” lightweight X11-based graphics library
  • parametric representation's Line Algorithm โ€” crisp line drawing between 2D points
  • Matrix Transformations โ€” rotation, scaling, projection
  • Manual memory management โ€” malloc/free with zero leaks
  • Event hooks โ€” capturing user input via keyboard & mouse
  • Color interpolation โ€” dynamic color gradient rendering by height

๐Ÿง  What I Learned

Working on FDF taught me to think like the machine: to break down visual perception into raw math and rebuild it line by line. I learned:

  • How 3D transforms work behind every game and simulation
  • Why graphics programming is both beautiful and brutal
  • How to optimize for rendering performance in C
  • How to structure code in an event-driven paradigm
  • How passion turns math into art
  • But above all โ€” how to turn low-level tools into something beautiful.

๐ŸŽฎ Controls

Action Key(s)
Move Map Mouse (Drag)
Zoom In / Out + -
Rotate L / R
Change Projection P (Parallel) / I (Isometric)
Reset View Space
Exit Program ESC

๐Ÿ“ฆ Installation

Requirements: cc, make, and a working X11 environment (Linux/macOS)

git clone https://github.com/elsayedamine/FDF.git
cd FDF
make
./fdf test_maps/42.fdf

โค๏ธ Dedication

This project is precious to me. It was the first time I felt like I wasnโ€™t just coding โ€” I was creating.

To every line of code that frustrated me, and every pixel that finally landed where I wanted: thank you for teaching me patience, persistence, and precision.

To anyone building something meaningful from scratch โ€” keep going. Itโ€™s worth it.

โ€” Amine Elsayed.


๐Ÿค Acknowledgements

  • 1337 Coding School for pushing us beyond our limits
  • MiniLibX โ€” tiny, but mighty
  • Everyone who ever told me to โ€œjust draw it myselfโ€
  • @a-hakki โ€” for his help, support, and unwavering dedication to my wor

โ€œThe only difference between art and code is the compile step.โ€

About

๐Ÿ–ฅ๏ธ FdF - 42 Project FdF is a wireframe 3D renderer written in C using MiniLibX, featuring parametric line rendering ,and isometric projection, and events management. ๐Ÿš€

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published