10
votes
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$) ...
6
votes
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 ...
5
votes
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 ...
5
votes
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 ...
4
votes
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 ...
3
votes
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 ...
3
votes
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 ...
3
votes
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 ...
3
votes
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 ...
3
votes
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
votes
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 ...
2
votes
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 ...
2
votes
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}...
2
votes
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 ...
2
votes
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 ...
2
votes
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 ...
2
votes
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 ...
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 ...
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 ...
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 !
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 ...
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.
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 ...
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 ...
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.
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
polygon × 57computational-geometry × 14
mesh × 9
geometry × 8
3d × 6
algorithm × 6
clipping × 5
cad × 5
opengl × 4
vector-graphics × 4
2d-graphics × 4
rendering × 2
c++ × 2
mathematics × 2
gpu × 2
shading × 2
data-structure × 2
triangulation × 2
drawing × 2
edge-detection × 2
integral × 2
scanline × 2
shader × 1
transformations × 1
pathtracing × 1