Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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

Screen Shot 2024-03-24 at 4 52 39 PM

## Render examples
Screen Shot 2024-03-23 at 11 07 14 AM
Screen Shot 2024-03-23 at 11 17 07 AM
Screen Shot 2024-03-24 at 5 09 25 PM
Screen Shot 2024-03-24 at 5 05 00 PM
Screen Shot 2024-03-24 at 5 03 45 PM