Questions tagged [clipping]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
1answer
83 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 ...
0
votes
0answers
19 views

How to interpolate vertex while clipping in homogeneous clip space?

I want to clip triangles to the near plane, in homogeneous clip space, so for each edge, I have to see if it crossed the near plane. If it has, I linearly interpolate the two endpoints based on the ...
1
vote
1answer
20 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 ...
0
votes
0answers
37 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 ...
0
votes
0answers
22 views

Determine the screen space bounding box of 3D perspetive projected plane

I want to draw a 2D axially aligned rectangle in screen space that covers an arbitrarily oriented 3D projected plane. It sounds easy, just project the 4 corners of the plane, compute the extents, draw ...
0
votes
0answers
25 views

How to calculate clip to device coordinates with matrix

I am trying to convert my points from Cartesian points (X,Y,Z) and run them through a clip to device pipeline. I do not know the specific matrix for this problem and was looking for some help. Thanks
3
votes
1answer
181 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 ...
2
votes
1answer
31 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 ...
8
votes
2answers
2k 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://...
1
vote
0answers
61 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 |...
1
vote
0answers
152 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 < ...
4
votes
1answer
518 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. ...
3
votes
3answers
311 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 ...
3
votes
2answers
355 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 ...
1
vote
1answer
113 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 ...
6
votes
2answers
1k 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?
7
votes
1answer
138 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 ...
1
vote
0answers
130 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 ...
4
votes
1answer
1k 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 ...
3
votes
1answer
502 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 ...
2
votes
1answer
755 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. ...
2
votes
1answer
125 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 ...
4
votes
1answer
263 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. ...
4
votes
1answer
231 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 ...
3
votes
1answer
228 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, ...
3
votes
1answer
378 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 ...
4
votes
2answers
838 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 ...
7
votes
1answer
737 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
vote
1answer
728 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 ?
4
votes
1answer
108 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, ...
9
votes
0answers
141 views

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