Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
0answers
37 views
0
votes
1answer
39 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
43 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
30 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
57 views

Showing the geodesics on an ellipsoid [duplicate]

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

Problem defining a polygon

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

Deleting the same lines from a list

Say I have a list of Lines: ...
2
votes
2answers
105 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
70 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
52 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
278 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
38 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
54 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
83 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
263 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
70 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
123 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
119 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
193 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
123 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
81 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
57 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
511 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
99 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
105 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
552 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
51 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
70 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
175 views

How to Interpolate a 3D MeshRegion?

If you were given some discrete MeshRegion called r (you don't know R): ...
1
vote
2answers
95 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
89 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
47 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
127 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
110 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
58 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
288 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
131 views

Speeding up Nearest with multiple distance thresholds

Consider the following example of using Nearest: ...
4
votes
2answers
142 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
119 views

Finding Intersections Between Arbitrary Surface and A Line

I have a self-intersecting surface H defined as follows: ...
0
votes
1answer
83 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 ...
1
vote
1answer
73 views

ImplicitRegion evaluates the region incorrectly when it must be empty

Consider the following implicit region: ...
8
votes
2answers
224 views

Relative Neighbourhood Graph

Is there some way to efficiently compute the relative neighbourhood graph on $n$ Euclidean points in $\mathbb{R}^{d}$? Though one can simply define ...
3
votes
1answer
59 views

Extract Halfspace representation of a ConvexHullMesh

I have computed the convex hull of a set of points in $\mathbb{R}^{n}$ using ConvexHullMesh. This describes a convex polytope $\mathcal{P}$. I was wondering if there is any easy way of getting a ...
0
votes
0answers
111 views

How to evenly distribute points inside a sphere?

SpherePoints[] gives me a fairly even distribution of points on the surface of a sphere. However, following this, I can have a much better distribution (although ...
5
votes
3answers
151 views

How to get size of each polygon of a Voronoi diagram using Shoelace formula?

The following code gets all vertices of all polygons (mesh cells) of VoronoiMesh[pts]: ...
7
votes
3answers
191 views

Draw circles and compute <sum of circle areas>-<area of overlaps of the circles>

The following code draws the polygons of VoronoiMesh[pts]: ...
8
votes
2answers
160 views

Detect and fix invalid polygon

I have a polygon given by ...
7
votes
0answers
83 views

Higher order Laplacian flows

Given disjoint surfaces $q_i$ in 3D and their 1D boundary curves $\partial q_i = \gamma_i$, I seek a surface $p$ that joins the $q_i$, where $p \cup q_i$ forms a (piecewise) $C^k$ surface that ...
11
votes
5answers
536 views

Evenly spaced points on boundary of polygon

I have a polygon and I would like to generate $n$ evenly spaced points along the boundary.