# Questions tagged [clipping]

The tag has no usage guidance.

30 questions
Filter by
Sorted by
Tagged with
1 vote
75 views

### OpenGL layered rendering with multiple additional clip planes per view

I want to render a scene from multiple positions and orientations. I think the geometry shader is a good choice to not use the Vertex and tessellation shaders for each camera position again. So I want ...
• 519
1 vote
182 views

### Rendering a volume that might be completely clipped in OpenGL

Suppose that I have some world-space volume (which we may assume is a convex polyhedron with a small number of vertices), and I want to render its intersection with the view frustum, such that every ...
• 113
165 views

### 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 ...
• 269
1 vote
51 views

### Using original vertices coordinates after clipping

Clipping is down in homogeneous clip space, therefore after multiplying the vertices by the model-view matrix. But as we do clipping in clip space, the position of the new vertices that we interpolate ...
• 269
59 views

### Clipping 3D Perspective matrix

I am trying to implement clipping in my simple renderer, but i have a trouble with setting the boundaries. I used the same projection matrix that is in OpenGL. The problem is, the vertices that are ...
279 views

### 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 ...
• 39
48 views

### 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 ...
• 171
4k views

### 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 https://...
• 183
1 vote
71 views

### 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 |...
194 views

### How to do clipping in camera space?

I don't even know where to start. So far, the only progress I have gotten is checking the z value of each vertex of each triangle. If all three vertices' z values > absolute value of far or < ...
686 views

### 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. ...
• 551
443 views

### Fast clipping without clearing stencil buffer

I'm writing an OpenGL application that runs on a Raspberry Pi, i.e., a quite resource-limited system. Essentially, a few quads with RGBA textures are overlayed/alpha blended on top of each other with ...
499 views

### Clipping circle and polygon and generate a CAD drawing

I'm developing a CAD drawing generator using C# and netdxf library (https://github.com/haplokuon/netDxf) The app first performs boolean operations (specifically - union & subtraction) on polygons ...
• 105
169 views

### Finding vertices of the outer contour of intersecting polygons

I have a bunch of intersecting convex polygons, I want to find vertices of the outer contour of all those polygons. An individual polygon is not self-intersecting. Could you please tell What could be ...
• 105
2k views

### 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?
• 153
149 views

### 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 ...
• 123
1 vote
163 views

### Algorithm for clipping convex quadrilaterals

I'm dealing with hardware that uses quads as its polygonal primitive. Not triangles. A triangle can be expressed by setting 2 of the 4 vertices equal to each other for a degenerate quad. For the 3D ...
• 11
2k views

### 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 ...
624 views

### 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 ...
• 143
930 views

### 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. ...
• 131
136 views

### 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 ...
• 145
310 views

### Meaning of the parameter in a line-plane intersection in the space

The scenery is the following: I have a polygon in the space, defined (the polygon) from your vertices. By 3 vertices of the polygon (non-aligned) revenue equation of the plane containing the polygon. ...
• 321
297 views

### Maximal and minimal no. of angles obtained from clipping a convex polygon with n angles

I'm trying to figure this out for my Computer Graphics course, but I find it very hard to understand. I believe the minimum number of angles obtained from clipping a convex polygon with n angles is ...
• 163
251 views

### 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, ...
• 171
472 views

### 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 ...
• 131
1k views

### 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 ...
• 8,159
996 views

### 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 ...
• 1,014
1 vote
785 views

### 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 ?
• 373
111 views

### 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, ...
• 231