The study of efficient algorithms and data structures to solve various problems involving point sets, line segments, polygons, polyhedra, simplices, etc.
Questions tagged [computational-geometry]
286 questions
8
votes
1 answer
How to calculate the area of intersection between a 3D volume and a 2D plane
Hello if anyone can offer insight on how to solve my problem that would be great!
I am looking to calculate the area of intersection between a 3D volume and a 2D plane.
3D volume: defined by 6 points (will always be a 3D wedge resembling a thick…
Chris
- 81
- 2
8
votes
1 answer
How to calculate the geodesic curvature of a discrete 3D curve?
I have coordinates of a set of points that form a closed loop that lies in a 3D surface. I know the equation of the surface and I can calculate it's surface normal at any point. I found that for a unit speed curve $\alpha(t)$ I can calculate the…
Amit Singh
- 85
- 5
6
votes
3 answers
How can I detect which among N bodies with different velocities will collide?
Suppose I have N different airplanes traveling on a two dimensional rectangular plane of size 400km x 400km (i.e. it is as if all planes travel at the same altitude). Assume each airplane has a randomly generated starting and ending points. Also,…
Paul
- 12,045
- 7
- 56
- 129
5
votes
1 answer
Algorithms for computing winding numbers of 2-sphere maps
I have a question concerning computational geometry which arises in the simulation of fields with topological defects, and I'd like to know whether there's an efficient algorithm (or any algorithm) to solve it.
The problem is basically the…
Michael Seifert
- 101
- 5
5
votes
2 answers
How to determine if a point is outside or inside a curve
Let curve $C_1$ be defined parametrically
$$\begin{aligned}
&x(t)=0.5\cos(t)-0.3\cos(3t),\\
&y(t)=1.2+0.6\sin(t)-0.07\sin(3t)+0.2\sin(7t)
\end{aligned}$$
How do I find if an arbitrary point $P(x,y)$ is inside or outside of this curve?
Also, for…
Rosa
- 533
- 5
- 11
4
votes
1 answer
Optimally "morph" one set of points into another
Given two sets of (two-dimensional) points, say, $A=\{a_1,a_2,\ldots,a_{n_a}\}$ and (you guessed it) $B=\{b_1,b_2,\ldots,b_{n_b}\}$, and $d^2_{i,j}=\mid a_i-b_j\mid^{\ 2}$ the "matrix" (not necessarily square) of distances between them, I want to…
John Forkosh
- 143
- 6
4
votes
1 answer
area of voronoi cell
I have a Voronoi diagram that I need to calculate the area of each cell.
This Voronoi diagram is produced by Voronoi command in MATLAB.
To find the vertices of the Voronoi cell I use Voronoin command in MATLAB, but the problem is that the first row…
rosa
- 293
- 1
- 8
3
votes
0 answers
The implicit form of a NURBS curve
I am trying to evaluate and analyse a NURBS curve to generate a mechanism. I understand that the general form of a NURBS curve is commonly written as a parametric equation in the form of $f_{par}(t)$.
Now, the criteria to generate the above…
Nicholas
- 31
- 2
3
votes
0 answers
Why is bounding a surface with a capsule is better than with a cylinder to detect intersections?
In this article:
https://www.geometrictools.com/Documentation/IntersectionOfCylinders.pdf
the writer says: "If you plan on using cylinders
for bounding volumes in a real-time graphics engine—think twice. A better alternative to a cylinder is…
Eminem
- 81
- 2
3
votes
1 answer
Good rectangular covering of an SDF
I have a 2D SDF describing my shape, but it's fine to think of it as a black/white image (black="inside" white="outside").
I want to generate a small set of rectangles (say, 8 of them) covering the image, which are allowed to overlap, and which…
jwd
- 131
- 3
3
votes
2 answers
Packing spheres inside a geometry
I am looking for packing spheres (can be monodisperse or polydisperse with known radii distribtuions) inside a geometry. I am sure this is a well explored scientific problem with applications in different fields. This being the case, is there anyone…
SKPS
- 171
- 1
- 7
3
votes
0 answers
Minimum axis aliged bounding box of convex polytope
I need to compute a $n-$dimensional integral with $n<10$ on a convex polytope. Since most numerical integration libraries (e.g. Cuba) expect the function to be integrated defined inside an axis aligned bounding box (AABB), I need to compute a…
Arrigo
- 301
- 1
- 5
3
votes
4 answers
find grid points inside the parallelogram defined by an origin and two vectors
I hope someone knows an efficient computational approach to the following 2D problem:
Given two vectors $\mathbf{A}$ and $\mathbf{B}$, find all grid points that lie within the parallelogram spanned by these vectors.
This feels like it should be a…
Floris
- 243
- 1
- 7
3
votes
2 answers
How do I find the smallest set of elements that covers a given shape?
Suppose I have a mesh consisting of a set $M$ of conformal elements that fill the region $R=[0,1]\times[0,1]$. Suppose that I also have a 2D shape $S\subset R$ whose boundary $\partial S$ is piecewise linear, but which is not necessarily convex nor…
Paul
- 12,045
- 7
- 56
- 129
3
votes
0 answers
Auto labeling algorithm
I have a set of points (2D space), and for every point there's a label (like city names on a map).
I want to find a real-time algorithm that allows labels to avoid overlapping, moving them from their original position if necessary.
I've heard about…
Jepessen
- 131
- 3