Polygons representation by Trapezoid method:

In many graphics systems a polygon is represented by the trapezoid method. In this method a polygon is broken to many trapezoids by the use of two line segments. Each pixel in the trapezoid is then taken in to account.

Line and Point Method: In this method points are plotted and lines are drawn to represent the polygon in question. The following algorithm is used to enter data in the display file:

1. Read MX and MY of length N.

[MX and MY are arrays containing vertices and N is number of sides of polygon]

2. i=0

D_OP [i] <– N

D_x [i] <–MX [i]

D_y [i] <–MY [i]

i<–i+1

3. do

D_OP[i] <–2

D_x [i] <– MX [i]

D_y[i] <– MY [i]

i<–i+1

}

While (i<N)

4. D_OP [i] <– 2

D_x [i] <–MX [0]

D_y [i] <–MY [0]

5. Stop

Shaunak Joshi says

Please explain in depth