basic concept of shooting rays and checking if they intersect with a triangle in 3d space. Space to draw the image
tri = p1,p2,p3 v1 = p2-p1 v2 = p3-p1 n = v1 X v2 t = (n + (O*D))/(N*D) I = o * tD a = 1/2(p1,p2,p3) a1 = 1/2(I,p2,p3 a2 = 1/2(p1,I,p3) a3 = 1/2(p1,p2,I) if a1+a2+a3 = a, then I is inside the triangle. if I is in triangle, put a colored pixel.