Let R be the rectangular window against which the lines are to be clipped using 2D Sutherland-Cohen line clipping algorithm. The rectangular window has lower left-hand corner at (– 5, 1) and upper right-hand corner at (3, 7). Consider the following three lines for clipping with the given end point co-ordinates : Line AB : A (– 6, 2) and B (–1, 8) Line CD : C (– 1, 5) and D (4, 8) Line EF : E (–2, 3) and F (1, 2) Which of the following line(s) is/are candidate for clipping ?
AB and CD
In Cohen–Sutherland clipping each endpoint gets a 4-bit region code (top, bottom, right, left) relative to the window \(-5 \le x \le 3,\ 1 \le y \le 7\). If both codes are 0000 the line is trivially accepted; if the logical AND of the codes is non-zero it is trivially rejected; otherwise the line is a candidate for clipping.
Step 1 — AB: A(−6, 2) has x \(\lt -5\), code 0001 (left). B(−1, 8) has y \(\gt 7\), code 1000 (top). AND = 0000 and the codes are not both zero, so AB must be clipped (it enters the window at x = −5, y = 3.2).
Step 2 — CD: C(−1, 5) is inside, code 0000. D(4, 8) has x \(\gt 3\) and y \(\gt 7\), code 1010. AND = 0000 with one code non-zero, so CD must be clipped.
Step 3 — EF: E(−2, 3) and F(1, 2) both lie inside the window, codes 0000 and 0000, so EF is trivially accepted and needs no clipping.
So both AB and CD are candidates; choosing AB alone or CD alone misses one of them, and EF is completely inside.
AB and CD option is correct.
In Cyrus-Beck algorithm for line clipping the value of t parameter is computed by the relation :
(Here P1 and P2 are the two end points of the line, f is a point on the boundary, n1 is inner normal)
Which of the following statement(s) is/are incorrect ?
(a) Mapping the co-ordinates of the points and lines that form the picture into the appropriate co-ordinates on the device or workstation is known as viewing transformation.
(b) The right-handed cartesian co-ordinates system in whose co-ordinates we describe the picture is known as world co-ordinate system.
(c) The co-ordinate system that corresponds to the device or workstation where the image is to be displayed is known as physical device co-ordinate system.
(d) Left - handed co-ordinate system in which the display area of the virtual display device corresponds to the unit (|x|) square whose lower left-hand corner is at the origin of the co-ordinate system, is known as normalized device co-ordinate system.
Codes :
Consider a window bounded by the lines : x = 0; y= 0; x = 5 and y = 3. The line segment joining (-1, 0) and (4, 5), if clipped against this window will connect the points
Arrange the 2-D viewing transformation pipeline.
A. Convert world-coordinates to viewing coordinates
B. Map viewing coordinates to normalized viewing coordinates using window - viewpoint specifications
C. Construct world - coordinates scene using modeling - coordinates transformations
D. Map normalized viewpoint to device coordinates
Choose the correct answer from the options given below:
In Cyrus-Beck algorithm for line clipping the value of t parameter is computed by the relation :
(Here P1 and P2 are the two end points of the line, f is a point on the boundary, n1 is inner normal)
Rearrange steps involved in two dimensional viewing transformation.
I. Map normalized viewport to device Co-ordinates
II. Convert world co-ordinate to viewing co-ordinates
III. Construct world – co-ordinate scene using modeling coordinate transformation
IV. Map viewing co-ordinates to normalized viewing co-ordinates using window-viewportspecification
Which of the following statement(s) is/are incorrect ?
(a) Mapping the co-ordinates of the points and lines that form the picture into the appropriate co-ordinates on the device or workstation is known as viewing transformation.
(b) The right-handed cartesian co-ordinates system in whose co-ordinates we describe the picture is known as world co-ordinate system.
(c) The co-ordinate system that corresponds to the device or workstation where the image is to be displayed is known as physical device co-ordinate system.
(d) Left - handed co-ordinate system in which the display area of the virtual display device corresponds to the unit (|x|) square whose lower left-hand corner is at the origin of the co-ordinate system, is known as normalized device co-ordinate system.
Codes :
Consider a window bounded by the lines : x = 0; y= 0; x = 5 and y = 3. The line segment joining (-1, 0) and (4, 5), if clipped against this window will connect the points