Questions tagged [clipping]

30 questions
10
votes
0 answers

How to describe the bi-directional links for the Weiler-Atherton algorithm?

My postscript interpreter currently implements the Hodgeman-Sutherland clipping algorithm but this is limited to simpler shapes and doesn't have a provision for utilizing various winding-number rules. So it doesn't help me to implement even-odd…
luser droog
  • 1,328
  • 2
  • 12
  • 27
9
votes
2 answers

Why do GPUs divide clip space Z by W, for position?

Background: I found that it is very easy to use a linear depth buffer, using only a slight modification to the canonical vertex transformation. The simplest method is found at the bottom of…
Jessy
  • 193
  • 1
  • 6
8
votes
1 answer

Maximum number of vertices after clipping a triangle against an AABB

I clip a 3D triangle against a 3D Axis-Aligned Bounding Box (AABB) to obtain the largest planar polygon of the triangle contained in the AABB. My clipping algorithm is a (slightly modified) version of the robust (e.g. clipping planes have a small…
Matthias
  • 1,044
  • 9
  • 25
7
votes
1 answer

How can I check if a polygon can completely contain a circle of a certain radius?

How can I check if a polygon (can also be irregular) can completely contain a circle of a certain radius? I do not want to actually draw a circle inside the polygon but just a boolean outcome whether or not it can be fit. I need this for an…
user7413
  • 123
  • 3
5
votes
2 answers

Why does opengl perform clipping in clip coordinates?

Is there any reason why OpenGL performs primitives' clipping in clip coordinates? Can it be at least theoretically done in normalized device coordinates?
Nolan
  • 153
  • 5
5
votes
2 answers

Could we dispense the near clipping plane?

Would it be, at least theoretically, possible to render without a near clipping plane? Could raytracing ignore this perchance? Quite many budding 3d artists have a WTF moment the first time they encounter the clipping plane. If this could be…
joojaa
  • 8,287
  • 1
  • 22
  • 46
4
votes
1 answer

Clipping for perspective projection

In the following two graphs, the red lines are borders of the perspective-projection frustum, the blue lines are to be rasterized, the green lines are perspective-projection lines, which are wrong. How do modern GPU pipelines do such clipping…
chaosink
  • 561
  • 1
  • 3
  • 13
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

Data structure and algorithm for clipping triangulation with leaf nodes of an octree

I have an application in which I am using an octree to store a volume mesh of axis-aligned bounding boxes (AABBs). Given a water-tight manifold triangle mesh, I need to: find if an AABB is intersected by or completely inside/outside of the surface…
gnzlbg
  • 141
  • 3
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
4
votes
1 answer

How to interpolate vertices when clipping?

When we clip in homogeneous clip space, we have to generate a new vertex located at the intersection between the edge and the clip plane. We thus have to interpolate the $(x , y, z , w)$ position of both vertices to generate the new vertex position.…
Jojolatino
  • 269
  • 1
  • 6
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
3
votes
1 answer

How to clip multiple tiled textures to polygon in Webgl / opengl

I have a bunch of planes each with their own texture in a grid. Currently I am rendering these as separate planes, each with their own texture, although I could use a single plane with multiple faces. Each color is a texture. I have a polygon mesh…
roob
  • 131
  • 4
1
2