Skip to content

A program that renders landscapes as intricate 3D objects, meticulously outlining every surface with lines

Notifications You must be signed in to change notification settings

DGross245/42-FdF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FDF

This is my FDF project at 42. The project requires the MLX42 library, GLFW, and specific configuration steps to run successfully.

Requirements

Before running this project, ensure that you have the following dependencies:

  • MLX42 library (clone from GitHub or git clone https://github.com/codam-coding-college/MLX42.git)
  • GLFW library (install via brew install glfw)

Installation

To install the necessary dependencies, follow these steps:

  1. Clone the MLX42 library into the project repository by either of the following methods:

  2. Install GLFW library using Homebrew by running the following command:

    brew install glfw

Configuration

After installing the required dependencies, you need to configure the project by editing the path to your Homebrew installation in the makefile. Follow the steps below:

  1. Locate the makefile in the root directory of the project.
  2. Change the path to the headerfiles of MLX42 in l.27 <INCLUDES>.
  3. Change the path to the GLFW lib in l.31 <GLFW>.
  4. Change the path to the MLX archive in l.33 <MLX>.
  5. Save and close the makefile.

Building the Project

To build the project, navigate to the root directory of the project in the terminal and run make

Running the Program

To execute the program, use the following command:

./fdf <path_to_map_file>

Replace <path_to_map_file> with the path to the map file you want to visualize. For example:

./fdf maps/10-2.fdf

Maps are located in the maps folder

Make sure to provide a valid path to an existing map file as a parameter when running the program.

Controls

Use the following controls to interact with the projection:

  • Numpad 9: Rotate clockwise
  • Numpad 7: Rotate counterclockwise
  • WASD: Move the projection around
  • =: Increase the 'Z' height
  • /: Decrease the 'Z' height
  • Numpad 1: Reset to isometric form
  • Numpad 3: Reset to parallel form
  • Numpad 4: Tilt to the left side
  • Numpad 6: Tilt to the right side
  • Numpad 8: Forward tilting
  • Numpad 2: Backward tilting
  • +: Zoom in
  • -: Zoom out
  • Esc: Quit the program

Showcase

Julia.fdf

t1.fdf

elem-fract.fdf

About

A program that renders landscapes as intricate 3D objects, meticulously outlining every surface with lines

Resources

Stars

Watchers

Forks