I am sorry for this hairy one on a Saturday evening but I need the solution - albeit not instantly.
In my application (a graphics one) I need to draw two filled 2D polygons of any size and shape in 3D space. That I do with the relevant API function and the necesaary matrix rotations. The problem however is that the elevational view of the two polygons may sometimes overlap (interfere) and it is important which polygon is nearer the viewer.
I need to establish which polygon is nearer the viewer so that I can block the obstructued view of the back one out. I also need to know how to "undraw" the blocked out portion of the back one.
I will appreciate help from someone working in this field.
PK Odendaal
pko@mweb.co.za
In my application (a graphics one) I need to draw two filled 2D polygons of any size and shape in 3D space. That I do with the relevant API function and the necesaary matrix rotations. The problem however is that the elevational view of the two polygons may sometimes overlap (interfere) and it is important which polygon is nearer the viewer.
I need to establish which polygon is nearer the viewer so that I can block the obstructued view of the back one out. I also need to know how to "undraw" the blocked out portion of the back one.
I will appreciate help from someone working in this field.
PK Odendaal
pko@mweb.co.za