We have the real system coordinates with
the observer placed in the points .The projection screen plane
is placed in
and the screen coordinates are .
We have for simplicity the coincidence within the axis and
We can transform from the real to the screen coordinates via the formulas:
(A) Divide the triangle into 2 triangles with a common side parallel to the X axis.
You must identify
by the y coordinate an upper corner (U) ,lower corner (L) and middle corner (M) ,then locate the second middle
(B) For each triangle locate on the edges wich are not in common a start point (S)
and an end point (E) with the same Y coordinate.Then you can easily manage every pixel from S to E.