# Tag Info

Accepted

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

This is likely more complicated than you would prefer, but: Compute the medial axis, which immediately yields the largest disks that fit inside the polygon: their centers are vertices (degree $\ge 3$) ...

### Rounding corners of polygon given vertices of its corners

Ok, Xenapior and Reynolds together have the right idea. But the explanation is a bit lacking so here is a image to explain it all and some further musings. First let us start by drawing an image (yes ...
• 8,447

### Why do polygons have to be "simple" and "convex"?

Polygon rasterization (the conversion of the analog polygon data into a raster image) is a key operation in rasterization-based rendering. As such, performing this operation fast, and with predictable ...
• 9,932
Accepted

### How to compute the following integral over a polygon?

Triangulate the Voronoi cell then write the integral as a sum over the triangles: $$\int_{\Omega}\|P - Pi\|\,dP = \sum_{k=1}^{N}\int_{\Delta_k}\|P-P_i\|\,dP.$$ Write the integration over the ...
• 2,226
Accepted

### Nomenclature: Other word for non-closed polygon?

I personally wouldn't like to describe non-closed piecewise linear curves as polygons. You might find polyline a better word to describe it. A polyline is a collection of connected straight line ...
• 1,283

### Vertices of a regular polygon given the incircle radius

what is the relation between radius of the in-circle and circum-circle of a polygon? That is $cos ( \frac{2\pi}{n}*\frac{1}{2} ) = cos ( \frac{\pi}{n})$ The triangle with edges from the center to ...
• 6,010
Accepted

### How to calculate vertex normals on a mesh with non-planar polygons

If you're interested in vertex normals specifically, there's an easy answer even for non-planar polygons that avoids the question of defining what the exact surface is: for each vertex, calculate the ...
• 25.2k
Accepted

### Polygons versus curve primitives in software rendering

Most software rendering engines dice the parametric primitives to micropolygons, usually on the fly as needed. In essence this reduces the needed complexity to determine intersections. The surface ...
• 8,447

### constrain based dynamic geometry generation

It is possible to generate geometry from constraints. However, some of your constraints are hard to formulate as continuous functions that can be minimized or maximized. Also the ones that can be ...
• 8,447

### An algorithm to find the area of intersection between a convex polygon and a 3D polyhedron?

There are different numerical approximations you could use: A simple solution is to use brute-force Monte Carlo integration. Distribute $N$ random points on the polygon and calculate the number of ...
• 3,666

### How to understand Z-Fighting?

The camera does not need to move for this problem to exist. You can see the mixed polygons as in your linked image even with a static camera. Things are worse with a moving camera because it makes ...
• 1,585

### Where should I project a polygon corner when it is behind me?

Trying to explain a problem seems to help the thought process. This is what eventually worked for me: I realized that I can easily find the point (in 3D space) where a line between two of the corners ...

### Explanation of the Vatti clipping algorithm

{π0,π8,π7,π6} and {π4,π3,π2} are called "left bounds" because if you look at both these bounds, the polygon interior is to the right of them: Likewise, {π0,π1,π2} and {π4,π5,π6}...
• 121

### An algorithm to find the area of intersection between a convex polygon and a 3D polyhedron?

If you have GL (or equivalent) available, the easiest way is probably to set up your projection matrix so that the plane of the polygon is the near clipping plane, draw the polygon into the stencil ...
• 6,870

### Projection of a Polyhedron on xy Plane with CGAL

A possible way to do this is tracing the silhouette edges of the polyhedron and projecting them to a 2d polygon only at the end of the process. A silhouette edge (in your context) is defined by its ...
• 166

### Rounding a corner formed by Arc and Line

I suppose you want an arc of C0 and C1 continuity between the line and an arc. As illustrated above, you already have a vertex A which is the intersection of an edge and an arc of which the center ...
• 27
Accepted

### Back face detection

Now suppose in this case for front face where V and N are parallel to each then they makes angle 0Β°. In your example, V and N are pointing in opposite directions. The angle between them is 180 ...
• 9,932
1 vote
Accepted

### Why do 3d modeling packages use a single normal per polygon and how is this viable for smooth shading

I think the problem comes from this starting assumption: If we have a quad that is non-planar. A non-planar quad does not have a normal. It's not a flat surface, so you can't talk about what its ...
• 9,932
1 vote
Accepted

### Differential or intersection of islands of 2D polygons in different layers

In CGAL, there is the Arrangement package that allows to build a topologically valid planar partition given a set of segments, and the Regularized Boolean Set-Operations that provides boolean ...
• 126
1 vote
Accepted

### Drawing a square using glDrawArrays with GL_TRIANGLES

Doh !!! It was simply a typo ! A missing comma at the end of the line -0.5f, -0.5f, 0.0f // bottom left point What a relief !
• 213
1 vote

### 3D object to slices like in medical scan

Some terminology: Intersection of a polyhedron with a plane.                     Wolfram Demo.
1 vote

### An algorithms for covering a 2d polygon with a predetermined number of rectangles?

(Not an answer but my comments are too large for a "comment") This is more computational geometry than graphics. First of all, it would help if you could give an example (a drawing) which describes ...
• 315
1 vote

### Rounding corners of polygon given vertices of its corners

The cut length from the vertex is x*ctan(t/2), where t is the angle at this vertex.
• 27
1 vote
Accepted

### Rounding corners of polygon given vertices of its corners

Since you're working on CAD software, you probably want some precise results. Here an algorithm that could work: For each side: Compute the segment's equation. Compute each round corner's circle ...
• 830
1 vote

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

I don't know how the clipping library you are using returns the clipped objects, but if I understand your question, you want a way to represent your circles that does not use much memory? If you are ...
• 296
1 vote
Accepted

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

Sounds like youβre looking for a way to do a Boolean union operation. Thereβs a couple of algorithms linked from that article that should do the trick.
• 2,232
1 vote

### Fill an irregular region with 2D shapes

There is no general algorithm for packing problems. Only some of the special cases have known, and optimal, solutions. If you are packing one shape then finding a reasonable solution is possible. Like ...
• 8,447
1 vote

### List of triangles to minimum amount of convex polygons

If a edge corner is concave then it needs to border 2 of the output polygons. So one algorithm would be to find all concave corners (including the ones in the holes) and making cuts starting from ...
• 6,010
1 vote

### How to understand Z-Fighting?

As others mentioned, z-fighting/stiching occurs even if the camera is not moving. However, when the camera is moving and you're getting z-fighting, it will appear as though the polygons are ...
• 11

Only top scored, non community-wiki answers of a minimum length are eligible