Newbie 3d Maths, I'm Afraid...

Hello,

I'm having a go at creating an isometric tile-based graphics engine. So far I can draw maps consisting of perfectly flat tiles at different heights easily enough, but what I want to be able to do now is allow different heights to be used for the each vertex of a tile.

As a tile is a quadrilateral with 4 vertexes, how do I go about splitting that into two triangles? I know that the triangles may be on different planes. Each vertex's height is restricted to a range of -3 to +3 so the resulting shapes are not too weird.