https://github.com/osmosx/fdf
[fdf] project school 42. Project to learn about 3d programming. The program takes a map as parameter and creates its 3d representation.
https://github.com/osmosx/fdf
3d 42school minilibx viewer wireframe
Last synced: 11 months ago
JSON representation
[fdf] project school 42. Project to learn about 3d programming. The program takes a map as parameter and creates its 3d representation.
- Host: GitHub
- URL: https://github.com/osmosx/fdf
- Owner: osmosx
- Created: 2022-01-25T15:19:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-23T15:17:58.000Z (over 4 years ago)
- Last Synced: 2025-03-01T05:28:17.446Z (over 1 year ago)
- Topics: 3d, 42school, minilibx, viewer, wireframe
- Language: C
- Homepage:
- Size: 709 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fdf
#### It is a project to learn about 3d programming. The program takes a map as parameter and creates its 3d representation. MiniLibX library required.
> In this project you will discover the basics of graphic programming, and in particular how
to place points in space, how to join them with segments and most importantly how to
observe the scene from a particular viewpoint.
> You will also discover your first graphic library: [minilibx](https://harm-smits.github.io/42docs/libs/minilibx). This library was developed
internally and includes the minimum necessary to open a window, light a pixel and deal
with events linked to this window: keyboard and mouse. This project introduces you to
“events” programming. -pedago@42.fr
#

#
### Usage
Running `make` to generate the fdf executable. You can run the program with `./fdf [valid_fdf_file]`.
A valid fdf file will consist of a matrix of number delimited by spaces. Each number's position represents an (x , y) coordinate with the value of the number itself representing a height (z).
Valid fdf files will always have the same number of elements per row.
Example:
```
$> cat -e 42.fdf
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0$
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0$
0 0 10 10 0 0 10 10 0 0 0 10 10 10 10 10 0 0 0$
0 0 10 10 0 0 10 10 0 0 0 0 0 0 0 10 10 0 0$
0 0 10 10 0 0 10 10 0 0 0 0 0 0 0 10 10 0 0$
0 0 10 10 10 10 10 10 0 0 0 0 10 10 10 10 0 0 0$
0 0 0 10 10 10 10 10 0 0 0 10 10 0 0 0 0 0 0$
0 0 0 0 0 0 10 10 0 0 0 10 10 0 0 0 0 0 0$
0 0 0 0 0 0 10 10 0 0 0 10 10 10 10 10 10 0 0$
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0$
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0$
$>
```