• This method bears similarities to the hidden line method. The polygons are still depth sorted, but now polygons are filled, and back facing polygons are removed.
• The basic method is as shown below,
• Sorting polygons by depth is basically a function of finding the general center, and then drawing the rear most polygons first.
• A backfacing polygon can be eliminated by calculating its surface normal. The normal is then compared to the viewing axis. If there is more than 90deg between them the polygon doesn’t need to be drawn. (Note: this method assumes that vertices are defined in a counter clockwise order for the outside surface).
• The above diagram only talks about overlapping polygons, but penetration is an equivalent problem.
- with color added, objects look more real.
- still relatively easy to implement, and run quickly.
- doesn’t suit all computer equipment (eg. laser printers).
- surfaces must have outside defined and surfaces must be closed.
• Fill Algorithms generally look at a polygon on the screen, and fill the inside with pixels of a specific color.
• Clipping can also be done by a technique called Z-Buffering, using extra graphics memory. An extra byte is used to store the depth of a pixel when it is calculated. If a new pixel is chosen, it overwrites the last.