Outcode
Region and Outcode
Each region of the nine regions is assigned a 4-bit code,
the nine regions and their outcodes are shown below:
Line AD:
- Test outcodes of A and D; can't accept or reject.
- Calculate Intersection point B, form new line segment
AB and discard BD because it is above the window.
- Test outcodes of A and B; reject.
Line EH:
- Test outcodes of E and H; can't accept or reject.
- Calculate Intersection point G, form new line segment
EG and discard GH because it is right to the window.
- Test outcodes of E and G; can't accept or reject.
- Calculate Intersection point F, form new line segment
FG and discard EF because it is left to the window.
- Test outcodes of F and G; accept.
Go back to Cohen-Sutherland Algorithm
Contact:
Haowei Hsieh
hhsieh@cc.gatech.edu
http://www.cc.gatech.edu/gvu/people/Masters/Haowei.Hsieh.html
Last Change : Feb 19,1995