https://github.com/faithbyte/fdf
A fun project to visualize 3D landscapes in isometric projection, applying line drawing algorithms, linear transformations, and height-map rendering.
https://github.com/faithbyte/fdf
3d-projection-to-2d bresenham-line-drawing-algorithm maps minilibx wireframe
Last synced: 9 months ago
JSON representation
A fun project to visualize 3D landscapes in isometric projection, applying line drawing algorithms, linear transformations, and height-map rendering.
- Host: GitHub
- URL: https://github.com/faithbyte/fdf
- Owner: faithByte
- Created: 2022-02-27T10:53:58.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-15T15:03:32.000Z (over 2 years ago)
- Last Synced: 2025-02-09T18:41:27.016Z (11 months ago)
- Topics: 3d-projection-to-2d, bresenham-line-drawing-algorithm, maps, minilibx, wireframe
- Language: C
- Homepage:
- Size: 17.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
``` shell
sudo apt-get install gcc make xorg libxext-dev libbsd-dev
```
### Requirements for Mac:
* Xquartz
➜ Requirements installation:
``` shell
Brew install Xquartz
reboot
xeyes
```
## Installation
``` shell
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 :
``` shell
./fdf_bonus ./maps/julia.fdf
```

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](https://github.com/42Paris/minilibx-linux).