Hello,
I need a little help. I have to render 3D surface plot in C++ using GDI. I have approx. 1000 points [x,y,z] and I want to render a plot from them (it could be called height map or something like that.. exactly what Matlab "surf" function does). The speed is not big problem here, because the plot will be rendered once and then stored to image file so using GDI is enough.
I am able to render 2D plot (from bird view) without any problem by just omitting Z coordinate and simply drawing polygons from 4 neighbouring points. I even fill each rectangle by different color by differentiate their heights. I get this result (which is same as rotating Matlab plot to bird view):
[attachment=16122:plot2d.png]
But now I want to rotate it so the Z coordinate is visible - just to get something like this:

I tried to create projection matrix and multiply each point by it but I didn't get anything usable. Could anyone help me with this?
Thank you!