Questions tagged [computational-geometry]

Questions on constructing graphical objects using relatively complex computations relating to the mathematical structures defining those objects. Examples include convex hulls, Voronoi diagrams, Delaunay triangulations, mathematical constructions, symmetries, genuses of curves and graphs and programmatic constructions of polyhedra.

Filter by
Sorted by
Tagged with
3
votes
1answer
101 views

Analogue of SpherePoints in higher dimensions?

I'm looking for an analogue of SpherePoints that works in dimensions higher than 3, has this been created already? A random sample from unit ball will be ...
5
votes
1answer
75 views

How to generate an heterogeneous mesh

I'd like to generate a mesh with a big variance in cell size. Something like I'd prefer not to rely on a vertex model and perhaps use something simpler, like ...
2
votes
1answer
84 views

Efficient way to pick up pairwise vertices of certain Euclidean distance in arbitrarily dimensional coordinates? [closed]

I have a grid graph with x and y vertices in each direction. The 2-dimensional coordinates of the graph ...
2
votes
0answers
61 views

Inner polygon approximation

Suppose you want to perform an inner approximation of a planar semialgebraic set by a finite set of polygons. The following is a quick way to yield an approximation but I am not convinced that it is ...
3
votes
1answer
69 views

Does DelaunayMesh use exact computations? What is the treatment of non-generic cases?

Computing Delaunay complexes can be sensitive to numerical instabilities, especially in higher dimensions. I would like to know how much I can rely on Mathematica's answers when using ...
4
votes
2answers
282 views

Generate Aztec triangle of size n automatically?

In the paper titled "Perfect Matchings of Cellular Graphs" by Mihai Ciucu, the Aztec triangle of size n (n= 1, 2, 3, 4, 5, ...) is equivalent to a ...
5
votes
2answers
145 views

Automatically get points in a given triangular lattice and vice versa?

Given a triangular lattice which grows with number n, as follows I want to list all the connected points in the lattice to form the ...
0
votes
1answer
146 views

How do you calculate the area of a surface with edges in mathematica

Like the title indicates, how could I achieve this. Normally what I did for a closed surface is as follows: ...
0
votes
0answers
42 views

Checking Membership of Conic Hull for Multiple Inputs

Suppose I have a given $10 \times 12$ matrix T, a $12 \times 1$ vector Subscript[\[Xi], 0], a $4 \times 12$ matrix ...
1
vote
0answers
39 views

Determine if intersection of Polygon and HalfLine is non-empty

I have a concrete example: ...
4
votes
1answer
85 views
6
votes
3answers
366 views

Efficiently compute Minkowski sum of a 2D Region and a Disc of radius r?

Given a 2D Mathematica Region, e.g. A = Region[RegionDifference[Disk[{0, 0}, 2], Disk[{2, 0}, 1]]], how can I grow the region by an arbitrary radius r? For example, ...
2
votes
3answers
327 views

Voronoi diagram of two data sets

My primary data is ...
1
vote
0answers
44 views

RandomInstance of GeometricScene producing unexpected result

Consider the following scene as an example: ...
9
votes
1answer
193 views

Digitizing a geometrical sensor

I want to quantify the flow from photos taken from a sensor such as this one: For a limited number of readings, I can use a plot digitization method. However, I need to do this many times for ...
0
votes
0answers
92 views

Why the output is not in numerical form in Mathematica 12.2?

Consider the following code: ...
3
votes
2answers
170 views

How to find the MeshConnectivityGraph[] from a list of independent cell mesh regions?

I'm generating a bunch of points inside a BoundaryMeshRegion. Then I generate the Voronoi mesh of the points, and take the intersection of the Voronoi cells into ...
2
votes
0answers
47 views

Maximizing the interior angles of a triangle on the Earth [closed]

Gauss once surveyed a triangle in the Harz mountains formed by Inselberg, Brocken, and Hoher Hagen to check if the sum of the interior angles really added up to $\pi$ radians. With the precision ...
4
votes
2answers
115 views

Determine and plot major and minor axes of ellipse

I have an element (El) constructed from a list of nodal coordinates (Nodes). Note: The list of nodes can be arbitrarily long. I then create a minimal area ellipse that encloses all of the node using a ...
7
votes
1answer
124 views

problem with DelaunayMesh 3D coordinates

I found DelaunayMesh works fine for 2D. For example, ...
0
votes
0answers
177 views

colouring Voronoi cells by their properties

I put a couple of previous posts together How can find the 2D Voronoi cell area distribution? Color code Voronoi cell areas depending on number of vertices color voronoi cell based on area to make the ...
0
votes
0answers
47 views

Fortune's Algorithm (Conditional Step Size in `Manipulate`)

I am trying to implement Fortune's Algorithm. Here is my code so far. ...
17
votes
3answers
555 views

Faster “Closest Pair of Points Problem” implementation?

The closest pair of points problem is a common computational geometry problem: given n points, find a pair of points with the smallest distance between them. A naive algorithm of finding distances ...
5
votes
1answer
142 views

Property “Centroid” of result from ConvexHullMesh[] can not be extracted

As the title describes, specifically, simple code below ConvexHullMesh[RandomReal[1, {10, 2}]]["Centroid"] returns an error in V. 12.2, but it worked in ...
8
votes
2answers
233 views

Generate random lines that don't be too crowded between the intersections

It's easy to generate random lines, such as this ...
5
votes
0answers
151 views

How to obtain the adjacency matrix of morphological components?

I am wondering if there's a simple way to obtain the adjacency matrix of the morphological components of a segmented image. Consider the following example (originally, from this question): ...
1
vote
1answer
56 views

Get coordinates of Translated Polygon

I have many polygons of the following form that I wish to do more complicated processing and analysis based on it's updated location (such as relationships between geometries). ...
4
votes
1answer
125 views

How to unite polygons of the same color into a single polygon?

Let a partition of a planar polygon into colored polygons be given, i.e. something similar to We know the coordinates of the vertices and the color of each part, e. g. in such a way ...
2
votes
2answers
71 views

How to create an ImplicitRegion from a list of 2D coordinates [closed]

I have a set of (x,y) coordinates. How can I link them together to form an ImplicitRegion?
0
votes
1answer
121 views

Adopt Mathematica codes for circumscribed and inscribed ellipsoids to related sets

Users Daniel Huber and Dominic have provided an interesting answer each to the question JohnEllipsoids of constructing circumscribing and inscribing ellipsoids for a certain three-dimensional convex ...
3
votes
2answers
111 views

Estimation of the expected Euclidean distance between two random points on a unit $n$-hemisphere

What is the best approach to estimate, with Wolfram Mathematica, the expected Euclidean distance (in a $(n+1)$-dimensional space) between two points selected uniformly at random on a unit $n$-...
2
votes
3answers
147 views

Estimate the expected distance between two random points on the unit $n$-sphere [duplicate]

What is the best approach to estimate, with Wolfram Mathematica, the expected Euclidean distance in a $(n+1)$-dimensional space between two points selected uniformly at random on the unit $n$-sphere? ...
0
votes
2answers
125 views
2
votes
6answers
315 views

Graph/Construct (John) ellipsoids circumscribing and inscribing a certain 3D convex set

A famous theorem JohnEllipsoids of Fritz John informs us that associated with a convex body are circumscribed and inscribed ellipsoids of minimal and maximal volumes. Now, a body--argued to be convex ...
1
vote
1answer
101 views

Maximum area of projection of cuboid onto plane

For didactic purposes I solve with Mathematica the following problem (see Vasilyev's box on p. 17): when the area of the projection of a rotating cuboid in the three-dimensional space with coordinates ...
2
votes
2answers
143 views

Get 3D surface grown by constant distance

There is a nice example of how to generate an isometric visualisation of surfaces which are at a constant distance from a given region. All these examples are just working on one single region. If one ...
2
votes
2answers
171 views

Exporting a FEM mesh from a parametric surface

How is it possible to export a mesh for suitable finite element analysis (such as Abaqus) from a parametric surface expressions? I'm working on this kind of surface: ...
0
votes
0answers
58 views

Intersection Region of two Conic Hull

I have the following semi-infinite conic hull, r1=ConicHullRegion[{{0,0,0}},{{-1,0,0},{0,-1,0},{1,0,1}}]; r2=ConicHullRegion[{{0,0,0}},{{-1,0,0},{0,-1,0},{0,1,1}}]; ...
2
votes
1answer
104 views

Create concentric circles with numbers inside

Hello there if you can give me a hand I want to create and export to pdf the following figure, which if you realize forms the multiplication table. The idea is to be able to control the central number ...
3
votes
2answers
322 views

Cube cutting problem

Show[Graphics3D[{Cuboid[]}], ContourPlot3D[{x==1/3,y==1/4,z==1/5},{x,-0.2,1.2},{y,-0.2,1.2},{z,-0.2,1.2}]] Three planes divide the unit cube into 8 small cubes, ...
0
votes
0answers
49 views

Does Mathematica have a built-in n-dimensional hypervolume indicator?

Mathematica has so many functions hidden away in obscure packages that I thought I'd ask before starting to code one myself. Thanks in advance.
5
votes
4answers
347 views

Speed up the intersection of the diagonals of a regular polygon

I need to calculate all the intersection points of the diagonals of a regular polygon, following code is really slow, when n=15, it take about 30sec. I also tried using ...
1
vote
1answer
139 views

Checking Membership in Boundary of Conical Hull

I want to check whether a given point is also a member of the edges of a given conical hull. For example, I have: ...
0
votes
0answers
40 views

Increase precision of ConvexHullMesh

I want to generate a set of equations for all planes in the convex hull as specified in this question. The problem is that the generated set of equations don't correctly cover all the points. I run a ...
4
votes
1answer
113 views

Find intersection points of arbitrary BSpline curve

I'm researching some computational geometry and am trying to find a method of determining the {x,y} intersection of a circle and BSplineCurve for further processing. ...
1
vote
2answers
104 views

How to find the shortest distance between two regions?

I need to find the shortest distance between the two regions and the two points of the shortest distance, but the following code cannot achieve this requirement: ...
0
votes
0answers
45 views

Dump Curvature Information for 3d Models

Is anyone aware of any utility to generate and dump Principal, Gaussian and Mean Curvatures for a 3D Model or a set of points? I have reserched following tools - meshlab cloudcompare They are able to ...
2
votes
1answer
97 views

For an enclosed surface region, how to find the furthest point on that surface to another point that is not on that surface?

I have an enclosed 3D surface (a distorted sphere surface region, which is got by finding an enclosed contour of a 3D volumetric data, and apply RegionBoundary[BoundaryDiscretizeGraphics[ ]] to get ...
1
vote
0answers
86 views

Find the intersection coordinate of a line and a 3D surface defined by a contour plot

I have two points, for instance {1, 1, 1} and {10, 11, 15} that connected to form a line. I also have an enclosed surface region ...

1
2 3 4 5
13