All Exams Test series for 1 year @ ₹349 only
Question

Which of the following technique is used for Clipping?

The correct answer is
Sutherland-Cohen

Clipping Techniques in Computer Graphics

In computer graphics, clipping is a crucial process for removing parts of a drawing or image that lie outside a defined boundary, often called a clipping window. This ensures that only the relevant portions are displayed or processed further. Several algorithms exist for performing clipping, especially for geometric primitives like lines and polygons.

Understanding the Sutherland-Cohen Algorithm

The Sutherland-Cohen algorithm is a classic and efficient technique used primarily for clipping lines against a rectangular clipping window. It's known for its effectiveness in computer graphics applications.

Key aspects of the Sutherland-Cohen algorithm:

  • Endpoint Coding: Each endpoint of a line segment is assigned a 4-bit code. This code indicates the position of the endpoint relative to the four boundaries of the clipping window (e.g., Top, Bottom, Right, Left). A '1' in a bit position means the endpoint is outside the window on that side; a '0' means it's inside or on the boundary.
  • Trivial Acceptance/Rejection: If both endpoints have an 'out code' of 0000 (meaning both are inside the window), the entire line is trivially accepted. If the bitwise AND of the two endpoint codes is non-zero (meaning both endpoints lie outside the window on the same side), the entire line is trivially rejected.
  • Intersection and Clipping: If neither of the above conditions is met, the line potentially intersects the window. The algorithm computes the intersection point of the line with one of the window boundaries (chosen based on the out codes). The line segment is then shortened from the outside endpoint to this intersection point, and the out code is updated for the new endpoint. This process repeats until the line segment is either fully accepted or rejected.

This iterative shortening process makes the Sutherland-Cohen algorithm efficient because it quickly discards lines completely outside the window and only performs calculations for lines that actually intersect it.

Comparison with Other Techniques

Let's briefly look at the other options to understand why Sutherland-Cohen is the correct choice for clipping:

  • Stack-based Seed / Scan Line Seed: These methods are typically employed in area filling algorithms (like flood fill or boundary fill), not for clipping lines or polygons. They work by starting from an initial point (seed) and expanding based on connectivity rules.
  • Inverse Scaling: Scaling is a geometric transformation used to resize objects. While transformations are often performed before or after clipping, inverse scaling itself is not a clipping technique.

Therefore, among the given options, Sutherland-Cohen stands out as the specific algorithm designed for clipping operations, particularly for lines.

Was this answer helpful?

Important Questions from Two Dimensional Viewing

  1. 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)

  2. 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

  3. 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 :

  4. 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

  5. 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:

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App