Original Post
Hello, I am trying to code backface culling using only software rendering - No directx, no opengl. So I splitted a cube into triangles. Each face has two triangles. Calculation formula (found online) display = y1*(x3 - x2) + y2*(x1 - x3) + y3 *(x2 - x1); Some screenshots of teh results. screenshot "if display > 0" http://img305.imageshack.us/img305/6893/morethanzeroyo8.jpg screenshot "if display < 0" http://img305.imageshack.us/img305/2664/lessthanzerogj3.jpg Triangules are organized like this Face is square defined by P0, P1 P2 P3. P0---P1 | | | | P3---P2 T = P0 P2 P1 T' = P0 P3 P2 Example Front Face Triangules T = 0 1 2 T' = 0 3 2 Example Back Face Triangules T = 5 7 6 T' = 5 8 7 Where the point data is: P0 = -1, 1, 1 P1 = 1, 1, 1 P2 = 1, -1, 1 P3 = -1, -1, 1 P5 = -1, 1, -1 P6 = 1, 1, -1 P7 = 1, -1, -1 P8 = -1, -1, -1 Thanks for your comments. [Edited by - gonssas on January 10, 2007 10:51:17 AM]