Skip to content
/ fdf Public

A fun project to visualize 3D landscapes in isometric projection, applying line drawing algorithms, linear transformations, and height-map rendering.

Notifications You must be signed in to change notification settings

faithByte/fdf

Repository files navigation

fdf

This project is about creating a simple wireframe model representation of a 3D landscape by linking various points (x, y, z) thanks to line segments (edges).


Requirements

Requirements for Linux:

  • make
  • gcc
  • package xorg
  • package libxext-dev
  • package libbsd-dev

➜ Requirements installation for Debian Distributions:

sudo apt-get install gcc make xorg libxext-dev libbsd-dev

Requirements for Mac:

  • Xquartz

➜ Requirements installation:

Brew install Xquartz
reboot
xeyes

Installation

git clone https://github.com/irhesri/fdf.git
cd fdf
make bonus

Usage

  • Start The executable:
./fdf_bonus [map name]

Note:

  • If the map doesn't exist in the same directory you should provide the path along with name [path/name].
  • The map extension should always be .fdf

The map:

Each number represents a point in space:

  • The horizontal position corresponds to its axis.
  • The vertical position corresponds to its ordinate.
  • The value corresponds to its altitude, and it may contain a comma followed by the color of the line in hexa.

Example :

./fdf_bonus ./maps/julia.fdf

fdf julia

in this example i tried all the keys except of p

Controls:

  • + - : Zoom in and out
  • : Translation up and down
  • : Translation left and right
  • w s : Changing the altitude (z)
  • a d : Rotation
  • p : Parallel projection
  • ESC : Close the window

Restrictions:

  • Only the next functions are allowed:

open, close, read, write, malloc, free, perror, strerror, exit

All functions of the math

All functions of the MiniLibX

  • You must use the MiniLibX.
  • Global variables are forbidden.

Credits

The mlx library used in the project was provided by Minilibx.

About

A fun project to visualize 3D landscapes in isometric projection, applying line drawing algorithms, linear transformations, and height-map rendering.

Topics

Resources

Stars

Watchers

Forks