0

FdF โ€” Wireframe 3D Renderer

FdF is a 3D wireframe renderer built in C using the MiniLibX graphics library. It projects 3D maps onto a 2D plane with isometric or parallel projection, handling color gradients, keyboard controls, zooming and rotations. Developed as part of the 42 Barcelona curriculum.

๐Ÿงต FDF โ€” 3D Wireframe Renderer

FdF (Fil de Fer) is a 3D wireframe visualization project developed in C using the MiniLibX graphics library.
It reads a map file containing altitude values, converts them into 3D coordinates, and renders them as a rotating and zoomable isometric wireframe model.

This project introduced me to graphics programming, matrix transformations, event handling, and the fundamentals of rendering pipelines.


๐Ÿš€ Features

๐Ÿ”น 3D Projection Engine

Supports:

  • Isometric projection
  • Parallel projection

Transforms 3D coordinates (x, y, z) into 2D screen positions.

๐Ÿ”น Smooth Rendering

  • Bresenham line-drawing algorithm
  • Real-time updates
  • Pixel-perfect precision

๐Ÿ”น Color Management

  • Altitude-based color gradients
  • Custom color mapping
  • Smooth transitions

๐Ÿ”น Interactive Controls

Keyboard input for:

  • Rotate X/Y/Z
  • Zoom in/out
  • Move model
  • Adjust altitude depth

๐Ÿ”น Map File Parsing

Handles .fdf maps describing terrain or custom 3D grids.


๐Ÿง  What I Learned

  • 3D to 2D projection mathematics
  • Rotation matrices & scaling transforms
  • Event loops and key hooks
  • Efficient drawing algorithms
  • Memory management in a graphics program
  • MiniLibX internals and pixel buffers

๐Ÿ”— Repository

๐Ÿ‘‰ GitHub: https://github.com/zmetreveli/FDF