Questions tagged [geometry]

Geometry is a branch of mathematics. Geometry studies the spatial relationships and forms of objects, as well as other relationships and forms, similar to the spatial in its structure.

Filter by
Sorted by
Tagged with
4 votes
1 answer
82 views

Suggestions for libraries that can numerically compute geodesics from a given Riemannian metric?

I am dealing with a non-trivial Riemannian metric $H$ defined on a particular subset of Euclidean space ($E \subset \mathbb{R}^n$). I was able to show the Riemannian manifold $(E,H)$ is geodesically ...
2 votes
1 answer
129 views

Computing numerical derivatives

I am trying to create a sweeping surface, for which I need the frenet frame of a curve. I am trying to compute this for arbitrary curves but for testing I am just using the parametric unit half circle....
  • 225
0 votes
0 answers
53 views

Open source implementations of the medial axis transform for vector shapes

Are there any open source implementations of the medial axis transform for vector shapes? I have searched without finding any useful results. It seems that CGAL library doesn't have it implemented nor ...
0 votes
0 answers
31 views

spherical harmonics perturbation

Is there a way to use spherical harmonics to represent a perturbation on a sphere that has a golf ball dimple pattern? What I have write now looks very asymmetric: With the following expression: $${\...
  • 111
1 vote
0 answers
31 views

Difference between Numeric, Combinatorial, and Geometric Computing

In the paper [1], author has discussed a distinction between the 3 types of computations: numeric, combinatorial, and geometric. The author says that Geometric computation is one that has elements of ...
  • 111
2 votes
1 answer
84 views

Min supporting line of a set of points

I am following along Rourke's book and I am trying to do the excercies mentioned in this SO post: Min supporting line for a set of points Design an algorithm to find a line 𝐿 that: has all the ...
  • 225
6 votes
1 answer
188 views

Minimum distance from point to surface

I’m looking for code that is well-suited to solving a fairly simple minimization problem: I have a reference point $\mathbf p$ in 3D space, and I want to minimize $\|\mathbf x - \mathbf p\|^2$ subject ...
  • 119
4 votes
0 answers
76 views

How to do a parametric study of arbitrary 2D surface?

I need to do a parametric study of the performance of a room heater on different rooms by simulating the temperature distribution in there. The problem here is that the rooms are not simple rectangles ...
1 vote
1 answer
125 views

Finding weighted average of curves

This is related to my previous post here I have a dataset with values of multiple curves. An example plot is shown below. I want to scale the curves (move up/down) so that all curves overlap. The ...
  • 459
8 votes
2 answers
196 views

Approximating the boundary between two sets of points (in 2D): Fitting a region

Given two sets of points $p_{\text{in},i}$ and $p_{\text{out},j}$ inside and outside of what I intuitively call a "region", I would like to estimate and describe the boundary of this region. ...
4 votes
2 answers
280 views

Computation of the tensor of curvature on surface mesh

Is there a formula which enables the computation the tensor of curvature knowing the following at each vertex and cell of a triangulated mesh: Normal vector Two arbitrary vectors in the tangent space ...
3 votes
2 answers
101 views

Metric Space for Direction Cosine Matrix?

I work in the medical field. Sometime we receives MR images that have been acquired along the same direction, however when looking up the direction cosine matrix, the values are slightly different (up ...
  • 143
-1 votes
2 answers
104 views

Calculating versors of a plane from the normal versor

I'm trying to calculate the 2 perpendicular versors (unit vectors), $\vec{n_1}$ and $\vec{n_2}$, that define a plane whose normal versor (unit vector) is $\vec{n_n}$. For example, assuming that the ...
5 votes
1 answer
924 views

Algorithm to merge two polygons (using connectivities)?

I am struggling with implementing an algorithm that does one simple thing: Consider two polygons (one can just draw any two polygons and number their vertices), whose connectivities in a node list are:...
  • 155
3 votes
1 answer
77 views

Is there a source/cookbook of equations that approximate geometric shapes?

I'm numerically modelling flows around various geometric 2D shapes. Is there a good source/cookbook of equations that approximate these? Some examples are Rectangle: $(x-a)^n+(y-b)^n < r^n$ where ...
  • 81
4 votes
2 answers
3k views

Generate random smooth 2D closed curves

I would like to know how can I generate a collection of random 2D closed smooth curves. I thought about generating a random 3D surface with random peaks, and then intersecting the Z=0 plane with it, ...
  • 173
3 votes
3 answers
466 views

What are some algorithms to calculate the width of an arbitrary polygon when a bounding box approximation is inaccurate

What are some alternative algorithms to creating a bounding box for finding the max width of a concave, simple winding polygon, like the one in the below image? I prefer solutions that are more ...
  • 131
7 votes
0 answers
286 views

Finding points inside cells of power (generalized Voronoi) diagram

Suppose we have a set of points $p_1,\ldots,p_n\in\mathbb R^d$ as well as a set of weights $w_1,\ldots,w_n\in\mathbb R$. Recall that the power cell associated to the pair $(p_k,w_k)$ is given by: $$\...
1 vote
1 answer
203 views

How do I find the portion of a cell/voxel lying within a defined surface?

We have a 3-dimensional grid of voxels (or cells), with individual voxels being of volume $dx\,dy\,dz$ where $dx=dy=dz=1$. A cone-like surface is defined by some function, $z = f(x, y)$, which in ...
3 votes
2 answers
137 views

Is the similar subdivision of a delaunay mesh still delaunay?

I have a delaunay triangulation for a 2d box with say an airfoil inside. If I uniformly refine this mesh by subdividing each triangle in the mesh into 4 triangles by halving each edge, is the ...
  • 2,059
10 votes
3 answers
629 views

Linear algebraic research direction that's not to do with differential equations and physics?

So I've found some interesting linear algebraic research areas that's both pure-ish, with a numerical bent to it, too -- e.g. inverse eigenvalue problems have both interesting theoretical and ...
  • 101
0 votes
1 answer
65 views

How to find the nearest point inside a list in a given direction

Being $\bar{\mathbf{x}} \in \mathbb{R}^3$ a point and $S =\{\mathbf{x}\}_{i=1}^N \in \mathbb{R}^3$ a sample of N points. I am looking for a simple algorithm to determine the nearest point in $S$ in ...
  • 139
3 votes
0 answers
57 views

Calculating depth mask from different lighting

I have a object which is static, the camera is static and light source is moving. How can the depth mask be calculated ? Concept is to use - calculate height from shadow length Lets imagine a have ...
0 votes
2 answers
456 views

Ordering points from X Y coordinates

I have series of points extracted from a regular grid, with their X/Y coordinates. A previous algorithm (that I cannot modified!) output a list of these coordinates, but the ordering of these point is ...
  • 101
2 votes
2 answers
99 views

projective reconstruction from orthogonal views

This is a problem from projective geometry. Suppose I have a vector $z \in R^k$ of unit length $\| z \| =1$ inside a $k$-dimensional hypercube. I don't know its value but do know its projection upto ...
  • 203
0 votes
1 answer
753 views

Compute affine transformation between two sets of points

Consider two sets of points $P = (P_1, ...,P_n), \ Q = (Q_1, ..., Q_m) $ included in $\mathbb{R}^3$. I'm looking to compute an optimal affine transformation that "maps" $Q$ to $P$, although the sets ...
  • 103
2 votes
0 answers
72 views

Simultaneous update to barycenters

Suppose a tiling is given in 2D (an embedding of a planar triangulated graph), with all faces convex. Now suppose one moves each point, one by one, to the barycenter of its neighbors. I think that ...
1 vote
0 answers
54 views

Space covering optimization

I have the following problem: In the space $E=\{1, 2, \dots, N_x\} \times \{1, 2, \dots, N_y\}$, I want to define $N_R$ rectangles $R_k=\{x_k^0, \dots, x_k^1\}\times\{y_k^0, \dots, y_k^1\}$ which ...
4 votes
1 answer
516 views

Expanding Winding Number algorithm to arcs

I have a problem that I have been attempting to solve for a few days now. I was wondering if I would be able to get some assistance from the community. In order to detect if a point is in a polygon, ...
  • 489
2 votes
1 answer
75 views

Vector characterization of cylinder displacements in a box

We have a cylinder of length $l$ (in units of its radius $d,$ as basic unit of length set to $d=1.$) in a box, and we consider an orthonormal Cartesian coordinate system with its origin placed at the ...
0 votes
3 answers
296 views

Is it valid to assume the center of a bounding sphere to be also the center of the bounding box?

Computing an axis aligned bounding box of a point set is trivial. Computing a bounding sphere of a point set is also trivial when the center is known. Computing the center of the bounding sphere is ...
  • 1,453
5 votes
4 answers
2k views

Rotate a vector by a randomly oriented angle

We start off with a unit vector $\mathbf{v}$ randomly oriented in 3D space and we want to generate another unit vector $\mathbf{w}$ so that $$ \mathbf{w}\cdot \mathbf{v} = \cos \beta $$ where $\beta$...
10 votes
2 answers
892 views

Commonly-used metrics to quantify the irregularity of a triangular mesh

Say you have a triangular mesh on a flat plane. This has been drawn to eventually solve some problem in mechanics, for example. A mesh of equilateral triangles is the best inasmuch as the distances ...
1 vote
1 answer
303 views

Matrix Decomposition of Conics

I was reading about ellipse-ellipse intersection and I came across this article: https://math.stackexchange.com/questions/679622/intersection-between-conic-and-line-in-homogeneous-space/867428#...
  • 383
1 vote
1 answer
75 views

Distirbution of Points along a Line

I am facing the following problem: Given is a line of length $L$ which I want to split into $N$ segments. The lengths of the first $(s_1)$ and last segment $(s_N)$ are given. You can assume that the ...
  • 311
1 vote
1 answer
222 views

Gaussian geometry optimisation: molecule is getting dissociated into sub group?

I was trying to optimise CdSe (Cysteine) molecule using a semi-empirical method in Gaussian 09 (and gaussView) for a preliminary study of quantum dots. But it seems as the number of iterations ...
15 votes
3 answers
1k views

Fitting Implicit Surfaces to Oriented Point Sets

I have a question regarding quadric fit to a set of points and corresponding normals (or equivalently, tangents). Fitting quadric surfaces to point data is well explored. Some works are as follows: ...
  • 2,169
2 votes
1 answer
109 views

Finding smallest cube in $\mathbb R^n$ that contains intersection between two regions

I don't think this is a pure math problem, so I post it here. Assume we have two regions in $\mathbb R^n$: $$ \lbrace x : a \leq x \leq b \rbrace\\ $$ and $$ \left\lbrace x : \sum_{i=1}^n |x_i | \...
  • 189
7 votes
4 answers
635 views

How can I find a line segment with the most intersections along with the coordinates of the intersection points?

There are $n$ points in a 2-D plane and each is given by its $x$ and $y$ coordinates. They are stored in an array in an ascending order with respect to $x$. All points are connected together by line ...
7 votes
1 answer
320 views

Does some form of documentation of GMSH exist?

I am looking to implement GMSh into a simualtor that I am going to create. I am looking to integrate the geo, mesh, and post processor modules. However, looking online, it appears the documentation ...
  • 489
2 votes
5 answers
447 views

Fast comparison of line segments lengths

I have two line segments given by their endpoints $(a_1,a_2)$, $(b_1,b_2)$ in $R^3$ and want to know if they have the same length (up to some error), so that the naive test looks like $$|\, \Vert a_1-...
  • 133
2 votes
3 answers
282 views

Angle of rotation at a point in a deformed triangle

I have a 2D triangle which deforms with each vertex moving by some small ($\sin(x) \approx \tan(x) \approx x$) displacement vector. The displacement of any point in the triangle is linearly ...
2 votes
2 answers
943 views

Fitting orthogonal planes to a point set

I have a set of 3d points to which I want to fit two planes. I know the assignment of points to the planes so I don't need any RANSAC or similar. Currently, I'm using a PCA-based approach to fit two ...
  • 133
1 vote
0 answers
39 views

Detecting and joining series of line segments that run along each other

Given: Several circular series of map GPS coordinates for several bus routes. The GPS coordinates are not all equal when they run along the same road. The number of GPS coordinates for a single bus ...
4 votes
0 answers
3k views

Algorithm to determine if two polygons intersect

I'm working on an algorithm which should check if two polygons, described by their vertex coordinates, are: one inside the other, are intersecting or are separated image below describe this three ...
3 votes
5 answers
232 views

Distance between points

I am wondering how can I solve following problem. Arrange randomly $n$ points inside a square of side $a$ under the condition that the distance between any two points may not be smaller than 1. I ...
2 votes
2 answers
937 views

Ideas on how to search nearby geospatial data fast

I am looking at a very simple problem, but can't quite find the best solution. I need to accept a lat/lon coordinate and based on that coordinate find all the points within roughly ~1km (accuracy is ...
10 votes
3 answers
1k views

How to sample points in hyperbolic space?

Hyperbolic space in the Poincaré upper half space model looks like ordinary $\Bbb R^n$ but with the notion of angle and distance distorted in a relatively simple way. In Euclidean space I can sample a ...
  • 573
5 votes
1 answer
359 views

Shape measure for C-shaped objects

There are many well defined measures for many basic geometrical objects such as rectangularity (area coverage of minimum bounding rectangle), triangularity (area coverage of minimum enclosing triangle)...
  • 261
1 vote
1 answer
68 views

Layer on which ball belongs in tetrahedron

What is the most computationally efficient way to find the layer on which a ball (i) belongs when arranged in a tetrahedron or 3 dimensional triangle with a triangular base. The ball on the top layer ...