yeta1990 / fdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fdf (42 project)

Description

Draw 3d wireframes from 2d maps using the Minilibx graphical engine

Example of raw map and its wireframe:

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

Another example with color gradients

0 10 10 10 10 10 10 10 10  0
0 10 20,0xFF0000 15,0xFF0000 12 15,0xFF0000 17,0xFF0000 20,0xFF0000 10  0
0 10 15,0xFF0000 10 12 15,0xFF0000 15,0xFF0000 15,0xFF0000 10  0
0  5 15,0xFF0000 10 12 15,0xFF0000 15,0xFF0000 13 10  0
0  5 10  5  7 12 12 12 10  0
0  5  7  1  2  7  5  5  7  0
0  3  0  0  1  2  2  2  5  0
0  1  0  0  0  0  0  0  3  0
0  0  0  0  0  0  0  0  0  0

Description

Graphical

Instructions and usage

  • Download and compile minilibx 1, 2 in the path ./fdf/mlx, with something like this: git clone https://github.com/42Paris/minilibx-linux.git mlx && cd mlx && make && cd .. && make
  • Usage : ./fdf [map.fdf] <filename> [ case_size z_size ] where case_size param is the square width and z-size is the proportion and orientation of z-axis.

About


Languages

Language:C 98.0%Language:Makefile 2.0%