3D plotting of mathematical functions from scratch
I like watching videos on YouTube which describing how 3D on the screen is working. It's a difficult topic, especially when it comes to the math and game programming (with camera positions etc.). I started to play with GNUPlot but I realised that this program is not capable to make a perspective plot. So I started to program a solution in Python. The learning process was huge.
- Download all the files
- Run server.sh
- Visit http://localhost:8888
What does the program?
- It creates the mesh (lines) of the function
- It moves all points to the camera position
- After that the rotations take place
- Perspective Plot is happening, 3D to 2D with min1,max1
- SVG, JS Canvas and a PBM file is created
The PBM file is only created if the programs of the NETPBM package is installed. Otherwise it won't show that picture. I'm sorry for not providing more informations about how the parameters are affecting the plot. But I would not able to, just play with it and read the code. I figured out most of the stuff by myself and don't know how the things are named properly. I don't even know if I did it right.