Questions tagged [clipping]

32 questions
4
votes
1 answer

Worst Case Scenario for Cohen-Sutherland Line Clipping Algorithm

I'm currently enrolled in an entry level Computer Graphics class, and as I'm studying for my final, I realize I have a question regarding the Cohen-Sutherland line clipping algorithm. I understand the basics of the algorithm, such as how to compute…
4
votes
1 answer

Cohen-Sutherland Clipping

Specify individually the translation and scaling matrices required to transform a 2D window of [Xmin=-234, Ymin=156] and [Xmax=66, Ymax=456] to a display viewport of [Umin=45, Vmin=35] and [Umax=245, Vmax=185]. Ignore the question above since I…
TheRapture87
  • 181
  • 2
4
votes
1 answer

Parametric line intersection test

I have the following question in an exam review and I am looking for feedback about how to approach the solution. Any advice will be highly appreciated. "Using a parametric line intersection test, give the parameter values of the endpoints of a…
JORGE
  • 261
  • 1
  • 2
  • 3
3
votes
1 answer

3D coordinates of intersection point in clipping for a rasterizer

When doing clipping in homogeneous coordinates, we need to find the coordinates of the intersection of the viewing frustum with the line to be clipped. This can be done easily if we want those coordinates to be in screen space(simply divide by the…
Andreas
  • 39
  • 1
3
votes
1 answer

Why should you do homogenization after clipping?

Is it just so you avoid unnecessary divisions or are there other advantages as well? I've just implemented the Sutherland–Hodgman clipping algorithm and read online that you should do homogenization after clipping to avoid divisions and to "avoid…
donutboy
  • 143
  • 6
2
votes
1 answer

What are the outcodes that would be assigned to these points?

In Cohen-Sutherland clipping, it assigns outcodes to the points on lines that are drawn to specify their orientation relative to the clipping window. In the diagram below, I'm confused on what outcodes that would be assigned to p1, p2, p3, p4? Can…
user9778
  • 191
  • 3
  • 7
2
votes
1 answer

Alternatives to Clipping in avoiding display problem

I know in computer graphic, we can set a world window in world coordinate system, and then mapping it to viewport which is the display window. Things that are not in the world window should not be displayed and we can do this through Clipping (like…
zfb
  • 145
  • 4
2
votes
1 answer

Outcodes in Cohen-Sutherland Clipping Algorithm

What advantages do the outcodes offer in this algorithm ? Do they help in simplifying the algorithm ? Do they decrease the number of calculations ?
john john
  • 423
  • 1
  • 3
  • 9
1
vote
0 answers

How to do clipping in 3D?

I have a list of vertices, I want to clip these inside the view frustum. Here's what I am planning to do : First I will loop through my list and check vertex $v$ for $|v.x| \le |v.w|$, $|v.y| \le |v.w|$ and $|v.z| \le |v.w|$. If it fails then I…