I'm having trouble converting 3D coordinates to 2D then print all the points in an isometric projection in C.
I tried this :
u = x / z;
v = y / z;
But when z = 0, my function enters an infinite loop.
I also found some stuff on google but this didn't worked with negative Z (I want bumps when Z > 0 and pits when Z < 0)
Here is how I work. My function gets a file that looks like this
0 0 0 0 0 0 0 0 0 0
0 9 9 9 9 9 9 9 9 0
0 9 9 9 9 9 9 9 9 0
0 9 9 9 -5 -5 9 9 9 0
0 9 9 9 -5 -5 9 9 9 0
0 9 9 9 -5 -5 9 9 9 0
0 9 9 9 -5 -5 9 9 9 0
0 9 9 9 9 9 9 9 9 0
0 9 9 9 9 9 9 9 9 0
0 0 0 0 0 0 0 0 0 0
the numbers represent the z coordinate and the origin (0;0;0) is upper left.