Discovering the wonderful world of computer graphics rendering a wireframe map.
You can find the subject here.
An excellent video by CodingMath explain to you the barebone of isometric 3D. I highly recommand you his videos : you can also find a tutorial about 2D and 3D Coordinate Rotation on his channel. Watching his first videos about vectors, basic trigonometry, primitives is very usefull.
Check out the Bresenham algorithm wikipedia page. The explanation rocks. My bresenham is directly inspired by their implementation.
If you're eager to learn more maths with some very serious stuff, you can check out this site (french!). Old but gold.
If you're not french or find the website shitty (it his in some way), you can download their book for free (5,834 pages, be ready..).
Good luck !
git clone --recurse-submodules https://github.com/noctuelles/42-fdf fdf
cd fdf && make fdf && ./fdf assets/maps/france.fdf
It will compile my libft and the MiniLibX.
The project is only compiling on Linux for now. I've not tested on MacOS nor making a suitable Makefile.
This project is compiled with the -O3 flag to improve speed. In this regard, all optimisation provided by the -O2 flag is enable.
Learn more about optimisation here.
make norm
Will check the norm on the whole project.
make clean
Clean the objects files.
make fclean
Clean the executable and the objects files.
make re
Re-make the executable from scratch.
- Color gradients based on the altitudes.
- Orthogonal top projection with colors.
- Auto-centering and auto-scaling of the map.
- Z Scaling of the map.
- Rotation on all axis.
- Reducing lag and redundant calculations.
- Better rotation and zoom : zooming in the middle of the rendering scene. instead of the origin. The same applies for the rotation.
- Each projection is fully isolated from the others. The rotation angles, tile width, of each projection will not intefere with the existing projection.
- Modular code : you can add more projection on the go, by just adding a transformation fonction. I'm using linked list and function pointer to make this possible.
- Added a compass in the bottom-left of the screen.
- Make auto zoom and center work with extremely large map.
- Better MiniLibX handling.
- Hiding H.U.D.