Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agvangrigoryan/fdf
This project is about representing a landscape as a 3D object in which all surfaces are outlined in lines.
https://github.com/agvangrigoryan/fdf
42yerevan algorithms c fdf-42 graphics mlx
Last synced: 9 days ago
JSON representation
This project is about representing a landscape as a 3D object in which all surfaces are outlined in lines.
- Host: GitHub
- URL: https://github.com/agvangrigoryan/fdf
- Owner: AgvanGrigoryan
- Created: 2024-03-14T14:01:01.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-03-28T12:15:36.000Z (10 months ago)
- Last Synced: 2024-11-24T01:19:41.843Z (2 months ago)
- Topics: 42yerevan, algorithms, c, fdf-42, graphics, mlx
- Language: C
- Homepage:
- Size: 562 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fdf
Fdf is a program that creates simplified 3D graphic representation of a relief landscape using [MiniLibX](https://harm-smits.github.io/42docs/libs/minilibx/introduction.html) library. Subject can be found [here](https://cdn.intra.42.fr/pdf/pdf/47326/en.subject.pdf).
FDF is short for ’fil de fer’ in French which means ’wireframe model’.
## Project goals
* Create a basic computer graphics project
* Learn about mapping
* Drawing lines in 3D using maths
* Implement axis rotation, zoom and transmittion![Map Rotation](preview/fdf-rotate.gif)
https://github.com/AgvanGrigoryan/FdF/assets/101641443/8d39155b-e198-41e6-9631-6e2e5947c798
## To compile and run
Run the following commands in Terminal:
```shell
# to build
> make# to run
> ./fdf test_maps/julia.fdf
```The program accepts a map in `.fdf` file as argument. Those files can be found at `test_maps/` folder. Those include lines of numbers separated by spaces (sometimes with HEX colour codes) representing height of the points on map.
To close window press `esc`.
## Scene control
Use `[+]` & `[-]` to zoom in and out
Use `[a]` & `[d]` to rotate on x-axis
Use `[s]` & `[w]` to rotate on y-axis
Use `[scroll up]` & `[scroll down]` to rotate on z-axis
Press `[↑]` to move upwards
Press `[↓]` to move downwards
Press `[←]` to move left
Press `[→]` to move right
## Additionally, you can control the scene using the buttons on the screen
## Render examples