Coder Social home page Coder Social logo

42_fdf's Introduction

42_FdF

This project aims to represent the wire mesh of a map in 3D.

Example

Screenshot 2022-12-17 at 05-08-52 fdf fr pdf
Example of a Conical representation.

Expected Result

The objective is to create graphically the schematic representation in “wireframe” (or "Fil de Fer" in French) of a map in relief by connecting different points (x, y, z) by segments.
The coordinates of the map will be stored in a file passed in parameter, here is an example with the map "42.fdf":

Screenshot 2022-12-17 at 05-10-29 fdf fr pdf

Each number corresponds to a point in space:

  • The horizontal position corresponds to its abscissa.
  • The vertical position corresponds to its ordinate.
  • The value corresponds to its altitude.

By executing the command ./fdf 42.fdf, we should see something similar to the picture below.
Screenshot 2022-12-17 at 05-11-10 fdf fr pdf

A minimal of two projections were expected.
In my case, three types of projections are included in the program:

  • Isometric
  • Parallel
  • Perspective

MinilibX

This project use the "MinilibX" library.
The installation process include the compilation from sources, the linking and the creation of the static library.

Some external packages can be necessary, depending on your OS: https://github.com/42Paris/minilibx-linux

A MacOs version is included in the "lib" folder. In this case, update the makefile for "minilibx-macos".

Install

Create or update the "fdf" program from sources.

make

Reinstall

Recompile completely the program.

make re

Clean

Delete object files created during installation.

make clean

Uninstall

Delete object files but also the compiled program.
It will not affect the source code.

make fclean

Usage

./fdf test_maps/42.fdf

MAN (complete user manual)

./fdf -h

Screenshots

42
42-h
42-p
elem-h
pyra-h
France

More screenshots are available in the "screens" folder.

Notes

I recommand to use the "clang" compiler because "gcc" generates linking error with the minilibx.
Check that clang compiler is installed on your system.

If there is permission issue:

chmod 774 lib/minilibx-linux/configure

Keywords

Simple graphics library
Plot of segments
Events
3D to 2D projection

42_fdf's People

Contributors

fdgbt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.