2024-01-15 23:38:48 +01:00
2024-01-15 23:09:34 +01:00
2024-01-15 23:06:59 +01:00
2024-01-11 15:40:41 +01:00
2024-01-11 19:04:04 +01:00
2024-01-15 22:06:54 +01:00
2024-01-15 22:06:54 +01:00
2024-01-14 14:48:09 +01:00
2022-03-15 16:29:42 +01:00
2021-07-20 11:09:19 +02:00
2021-07-27 15:27:29 +02:00
2024-01-15 22:06:54 +01:00
2024-01-15 23:38:48 +01:00

FDF - fil de fer

this is an exercise to discover 3D drawing, keyboard events, and pixel images manipulation

it reads a map, which is a simple text file like this :

0  0  0  0  0
0  0  0  0  0
0 10  0  0  0
0  0  0  0  0
0  0  0  0  0

and it converts it into a rectangular net, like a landscape with the height equal to the numbers :

example 3D of map before modification

we can modify the map to change the 3D drawing :

example 3D of map after modifications

it is based on a library called minilibx, which is like a simplified version of X11

some of the difficulties of this program :

  • finding the equations to transform a 2D drawing into a perspective
  • drawing a line between two points
  • bits manipulation for colors
  • organization of the code to take care of all the events and transformations
  • building images instead of asking the minilibx library to draw each pixel one by one

it can listen to keyboards events to transform the 3D, like turning around, zooming... :

zoom :

example 3D of map after modifications

turn :

example 3D of map after modifications example 3D of map after modifications

move :

example 3D of map after modifications

change height :

example 3D of map after modifications

Description
No description provided
Readme 128 MiB
Languages
C 82.9%
Roff 13.5%
Makefile 2.2%
Shell 1%
Raku 0.4%