Skip to content

FDF is a computer graphics project that uses the MiniLibX library to create a 3D wireframe model of a landscape. It teaches fundamental graphics programming concepts like isometric projection, interactive controls for zoom, translation, rotation, and includes features like depth shading and color rendering to enhance visual effects.

Notifications You must be signed in to change notification settings

mzsv/42FDF_bonus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FDF - Wireframe Model

Table of Contents

  1. Overview
  2. Objectives
  3. Features
  4. User Controls
  5. How to use
  6. Screenshots
  7. Acknowledgements

Overview

The FDF project is a basic computer graphics project using the MiniLibX library. It involves creating a simple wireframe model of a landscape by linking various points (x, y, z) with line segments. The project aims to familiarize you with the MiniLibX library and the basics of graphics programming, such as placing points in space and viewing the scene from a specific viewpoint. Bonus requirements included.

Objectives

  • Create a wireframe model representation of a 3D landscape.
  • Use the MiniLibX library to handle graphics.
  • Implement isometric projection for rendering the model.
  • Provide interactive controls for manipulating the model (bonus):
    • Zoom in/out
    • Translation
    • Rotation
  • Implement weak-perspective projection (bonus).
  • Implement color rendering (bonus).
  • Implement depth shading (bonus).

Features

  • Isometric Projection: Displays the 3D model in an isometric view.
  • Interactive Controls: Allows users to manipulate the model using mouse and keyboard inputs.
  • Graphical Window: Displays the model in a graphical window that supports smooth interactions.
  • Depth Shading: Renders the model such that the deepest (further away from the screen) points are darker, enhancing the illusion of depth.
  • Color Rendering Mode: Reads the color from the input file and creates color gradients over the segments between different points. Additional default color mode, assigned based on the height of each point.
  • Multiple Projections (Bonus): Includes additional weak-perspective projection.

User Controls

Mouse Controls

  • Left Mouse Button: Rotate the model.
  • Right Mouse Button: Translate the model.
  • Scroll Up/Down: Zoom in/out.

Keyboard Controls

  • C: Change color mode.
  • H: Display help.
  • I: Switch to isometric mode.
  • P: Switch to perspective mode.
  • S: Toggle depth-shade mode.
  • ESC: Close the window and quit the program.

How to use

Installation

  1. Clone the repository:
    git clone <repository-url>
    
  2. Compile the project:
    make bonus
    
  3. Run the project with a test map:
    ./fdf maps/test_maps/42.fdf
    

Screenshots

  • Bottom view. Perspective proj. Depth shade on. Default color
  • Bottom view. Perspective proj. Depth shade on. Default color
  • Perspective proj. Map color. Depth shade on
  • Perspective proj. Map color. Depth shade on
  • Depth shade on. Perspective proj
  • Top view. Perspective proj. Depth shade on. Default color
  • Isometric proj. Default color
  • Isomatric proj. Color off
  • Perspective proj. Default color
  • Top view. Perspective proj. Depth shade on

Acknowledgements

  • The 42 School for providing the project specifications and environment.

About

FDF is a computer graphics project that uses the MiniLibX library to create a 3D wireframe model of a landscape. It teaches fundamental graphics programming concepts like isometric projection, interactive controls for zoom, translation, rotation, and includes features like depth shading and color rendering to enhance visual effects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published