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
1
vote
0answers
92 views

Calculate the intersection points of a line and a parametrically defined 3D surface

Thanks to Henrik Schumacher for advice to simplify the sample code: I would be grateful for any pointers on the following issue. A line from an external point intersects the surface at 2 points (...
1
vote
1answer
60 views

Getting a list of cities that are located in more than one county (within a state; in this case Florida, USA)

To get the list of counties in the State of Florida, I first evaluate: EntityClass["AdministrativeDivision", "USCountiesFlorida"] which gives me a pill-shaped ...
4
votes
2answers
103 views

Automatic solution to label boundary elements with BoundaryMarkerFunction

Preparations Mathematica 11.3, Windows. Let us say I have a rectangular region with 10 little holes inside. Their coordinates are given by positionList. The ...
1
vote
0answers
46 views

Non-convex hull mesh from 3d points [duplicate]

I am trying to create a 3d mesh object from list of points, but the only options I see in Mathematica are ConvexHullMesh and ...
3
votes
1answer
62 views

Signed cell adjacency matrices (boundary operators)

In How to obtain the cell-adjacency graph of a mesh? there are some great answers that show how to obtain the cell adjacency matrix of a mesh. How would one generalize these to incorporate the ...
3
votes
3answers
106 views

RegionMember does not work with RandomPolyhedron or Polyhedron object

According to the documentation RegionMember should work with regions that are true for ConstantRegionQ. However, the function ...
8
votes
1answer
359 views

How can I select a specific triangle in my Delaunay mesh?

Here is the code I am working with. I create a list of random coordinates, then I create a triangular mesh with the code: ...
6
votes
0answers
82 views

How to make a function for image recognition

For example given a big set of random points, and I extract a small section of the random set of points, how can I find the small set on the big set? As a first approach I tried to do a Delaunay ...
0
votes
0answers
51 views

How can I create a Delaunay mesh in set of points inside an image?

Is there a possible way to create a Delaunay mesh inside an image given a set of points inside the image? for instance use the pixel coordinates to create the Delaunay mesh.
0
votes
0answers
38 views

Regions detecting/counting

Recently, I solved an analytical problem on the number of possible regions in a similar figure: I conducted numerical experiments on Mathematica to verify the results. Intersection points are easy to ...
1
vote
0answers
37 views

Possible bug with InnerPolygon and RegionUnion in version 12

case1 case2 case3 ...
0
votes
1answer
42 views

Quadric surface reduced form [closed]

I was just wondering, is there any way to determine which surface is the one given by the equation in general implicit form Without calculating the eigenvalues and basis vectors etc. Or if you ...
0
votes
1answer
48 views

Complex infinity at a point and division by zero

Edit: I've found out that the book was written for Mathematica 7, which was a pretty long time ago. It boils down to changes in syntax most probably, but simple renaming to lower lettercase does not ...
0
votes
0answers
31 views

Triangulations of a convex polygon

I have a piece of code which finds all triangulations of a convex polygon. It is known that a number of such triangulations for a given $n$-gon is is given by ($n-2$)th Catalan Number, so for instance,...
0
votes
0answers
58 views

Showing the geodesics on an ellipsoid [duplicate]

I have have code to the parametric plot of an ellipsoid: ...
1
vote
2answers
51 views

Problem defining a polygon

I have two polygons that are very similar as: ...
4
votes
3answers
209 views

Deleting the same lines from a list

Say I have a list of Lines: ...
2
votes
2answers
106 views

Fill points into a pre-rotated convex Dodecahedron

I am trying to fill a rotated convex polyhedron with points. This functions well in the unrotated case: ...
4
votes
0answers
71 views

Ideas for visualizing the shape of a random walk

Context: In the context of (3D) random walks or polymer chains, a useful quantity for capturing and characterizing the shape of the walk or the conformation of the polymer in space is the gyration ...
0
votes
0answers
59 views

Find two points (of maximum distance) lying on perpendicular intersecting polygon border

On a randomly generated convex hull, I found the two points of maximum distance on the region's perimeter (the points in black). I would like to find two points that lie on the perpendicular to this ...
9
votes
2answers
308 views

Catmull-Clark and Doo-Sabin Subdivision Implementations

I want to work on subdivision surfaces. Unfortunately, I don’t have any source code to start with. I need some Mathematica codes for applying Catmull-Clark and Doo-Sabin methods. I would like to ...
0
votes
1answer
43 views

Solve: line and rectangle intersections

I have been trying to find the intersections between a rectangle and a line, following the example given in the Solve function: ...
5
votes
1answer
57 views

Mesh cell count for Voronoi mesh too low

I was trying to solve this question out of interest and thought perhaps creating a Voronoi mesh, cropping it to a circle, and colouring the mesh cells might work. However, if I ask ...
0
votes
0answers
86 views

Graphics error in orthogonal trajectory

OT_Circles/Tractrices To find an orthogonal trajectory we generally replace slope by its negative reciprocal in its originating differential equation (DE). I.e., replacing $\phi\rightarrow \pi/2-\...
12
votes
2answers
264 views

Unexpected behavior of the procedure `Area` on the object 'Polygon'

Bug introduced in 11.3 or earlier and fixed on 12.0. Sometimes get a results, sometimes left unevaluated. For instance ...
4
votes
1answer
75 views

VoronoiMesh with custom distance function

I'm failing at reading the documentation. Is there a way to specify the distance function used by VoronoiMesh? As a stripped down example say I have a rank-1 lattice such as: ...
4
votes
2answers
133 views

Intersection lines of surfaces from list contour plots

I have two plots made with ListContourPlot3D. Is there a way to find the intersection curves of the surfaces represented in the two plots? I have tried ...
4
votes
1answer
128 views

Calculate total length of edges in select Voronoi diagram

I want to calculate the total length of edges in a Voronoi diagram like this I can calculate this with ...
5
votes
2answers
220 views

Draw bounding region by list of points

Suppose you have a list of data points, either in 2D or 3D; is it possible to plot the minimal bounding region containing all the points? Ignoring holes etc.
2
votes
2answers
128 views

Find the smallest and largest distance between two points distributed in 3D space

Suppose I have some 3D points, e.g. {{0, 0, 1}, {0, 0, 1.3}, {0, 1, 0}, {1.2, 0, 0}}. Now I want to find the smallest and largest distance between two points. A ...
1
vote
2answers
91 views

Trouble with Calculating Area of Parametric Region

This question stems from an attempt to solve the following question: How to calculate specific area on surface of sphere? First, I parametrize a circular loop: ...
4
votes
0answers
61 views

How to calculate specific area on surface of sphere?

I am trying to calculate the solid angle subtended by arbitrary-shaped loops on a sphere's surface. First, I parametrize circular loops by: $$\theta(t,k_{x0},r) = k_{x_0} + r \cos(t);$$ $$\phi(t,k_{...
6
votes
2answers
513 views

Calculate of total length of edges in Voronoi diagram

Does anyone have any suggestions how to determine the total sum of edges length in a Voronoi diagram?
1
vote
2answers
104 views

How to calculate arbitrary area on surface of sphere?

I am trying to calculate the solid angle subtended by arbitrary-shaped loops on a sphere's surface. First, I parametrize circular loops by: $$\theta(t,k_{x0},r) = k_{x_0} + r \cos(t);$$ $$\phi(t,k_{...
0
votes
0answers
108 views

Remove background image and redraw lines in black

I do not know if the title is correct. The image that I upload has liked me a lot because of the characteristic that no matter the angle it seems that it is looking at you, you could indicate me how ...
3
votes
2answers
568 views

How can find the 2D Voronoi cell area distribution?

I need to find the area distribution function of the 2D Voronoi cells in Mathematica version 11 and later. My old instructions for Mathematica 9 don't work anymore. How can I do it?
1
vote
0answers
52 views

Create a Weighted Region

I am trying the make (not super accurate, just for fun really) simulations of light curves, as just circles with various sizes and temperatures, then computing the ...
3
votes
2answers
77 views

Delaunay triangulation for 3D - a list of connections

I have a problem with Delaunay triangulation in 3D. I know that the function DelaunayTriangulation[vector] does not work in case of three-dimensional vectors. But ...
12
votes
2answers
183 views

How to Interpolate a 3D MeshRegion?

If you were given some discrete MeshRegion called r (you don't know R): ...
1
vote
2answers
101 views

The easiest way to get centroids of triangles tiling sphere

I need to tile a unit sphere with N equal equilateral spherical triangles and get an array of the coordinates {Phi, Theta} of the centroids of those triangles. What is the most straightforward way to ...
3
votes
1answer
99 views

How to find the cells of a region that intersect a line?

I'm looking for the fastest way to access the mesh cell (i.e. polygon) in a Region that intersects a Line in 3D. For example, <...
0
votes
0answers
48 views

Uniform distribution on the manifold: There exist a build-in solution?

In general, the problem is to generate many random points on the (high-dimensional, compact, smooth) manifold ~~ uniform distribution w.r.t. lebesgue measure. So, this is a common in the Monte-Carlo ...
3
votes
1answer
132 views

Generate convex-hull of a 15 dimensional space

This question follows my last post. I have a function $ \vec{f}: S^6 \times S^6 \rightarrow \mathbb{R}^{13} $ defined on two 6-dim hyperspheres. We will denote the function $ \vec{f}(\vec{x},\vec{y}) ...
2
votes
2answers
114 views

Vertices of a Rotated Polyhedron

I am attempting to geometrically transform a polyhedron (namely rotate and translate the polyhedron in global coordinates) and than find the new vertices. Here is what I have so far, but I am stuck at ...
0
votes
0answers
59 views

How to write the code for a general B-spline function?

I write the code for B-spline basis and it works very nicely but now I need help to write code for general B-spline functions I would like the code to show the spline segment in this way:
6
votes
2answers
292 views

How do I verify a vector identity using Mathematica?

I am trying to verify well known Frenet–Serret formulas in general setting using Mathematica. I need to consider a general space curve $r(s)=(x(s),y(s),z(s))$ in $\mathbb{R}^3$ and define its unit ...
8
votes
2answers
137 views

Speeding up Nearest with multiple distance thresholds

Consider the following example of using Nearest: ...
4
votes
2answers
163 views

How to make a frustum of a cone

For finite element purposes I need a frustum of a cone with a finite wall thickness, i.e. a tapered pipe. To make a cone is easy ...
2
votes
1answer
147 views

Finding Intersections Between Arbitrary Surface and A Line

I have a self-intersecting surface H defined as follows: ...
0
votes
1answer
89 views

Why is RegionIntersection failing on my custom Region?

I load a custom region, specified as BoundaryMeshRegion R = Import["C:\\data\\Profile.stl", "BoundaryMeshRegion"] and I try ...