Now I'm working at a 3D ASCII graphics library from scratch(sounds interesting not?).
Here's what I've done:
-projecting a 3d point on the screen
-displaying filled/wireframe triangles
-lighting (flat shading)
-Z-buffering - STUCK
All I need is a function like that
double getZ(double x1,double y1,double z1,
double x2,double y2,double z2,
double x3,double y3,double z3,
int screenx,int screeny) // 0<=screenx<=80 and 0<=screeny<=25
{
[...]
}
NOTE:
-I don't want to use any library such as OpenGL or DirectX
-I don't want to do the z-buffering calculation using a projection matrix. Just a triangle and screen coordinates.