Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
DOA: DOS:
Part A:
1) Derive a matrix for Window to viewport transformation and also discuss the
importance of window to viewport transformation
2) Write all the steps to Implement the cohen- sutherland line clipping algorithm.
1) End-points pairs are check for trivial acceptance or trivial rejected using the
outcode.
To perform trivial accept and reject tests, we extend the edges of the clip
rectangle to divide the plane of the clip rectangle into nine regions. Each
region is assigned a 4-bit code deteermined by where the region lies with
respect to the outside halfplanes of the clip-rectangle edges. Each bit in the
outcode is set to either 1 (true) or 0 (false); the 4 bits in the code correspond
to the following conditions:
Y > Ymax
Y < Ymin
* Bit 3 : outside halfplane of right edge, to the right of right edge
X > Xmax
X < Xmin
3) Can we say that like images, texts can also be clipped? If yes, justify your
answer by taking an example text and perform clipping.
Ans: Yes we say that images, texts also be clipped. A clip path is a drawing outline
that can be combined with another image such as a bitmap, or vector clip art. The
image inside or outside of the outline can be masked or deleted. Any closed outline
can be used as a clip path. Existing shapes or text can be used or clip paths can be
drawn around objects to pick them out of the background.
Examples of Clipping:
Graphic images can be built up by placing one clipped image over another, and then
vector artwork or text can be added. Clip paths can also be created from text
allowing you to create some interesting fills.
Draw a clip path around the mini and mask the outside
Import the second photo and put the clipped photo and some text on top
Part B:
5) Elaborate the various text clipping techniques used to clip a text by taking
suitable example.
6) Differentiate between Interior clipping and Exterior clipping. In what form exterior
clipping can be useful? Illustrate using some examples? Draw diagrams to define
pictorially?