# 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.

108 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2k views

### Using TetGen in Mathematica to get 3D Voronoi diagram

In this post, the use of TetGen for 3D Voronoi tesselation has been briefly discussed. However there is still no info about the use of TetGen to generate a 3D Voronoi diagram. The TetGen documentation ...
• 2,931
244 views

### Possible Bug with Options in DelaunayMesh

Bug introduced in 10.2 and persisting through 11.1 Update: It turns out after some testing, none of the Options work in ...
• 33.2k
289 views

### How to Calculate Biharmonic Distance in MMA?

There are many kinds of distances. One of them is Biharmonic Distance where I got the the image below from: The biharmonic examples are on the left, and the author kept his promise in the paper that ...
• 114
610 views

### Computing Ehrhart's polynomial for a convex polytope

Is there a Mathematica implementation for computing the Ehrhart polynomial of a convex polytope which is specified either by its vertices or by a set of inequalities? I am interested in knowing this ...
• 1,001
144 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 ...
• 807
196 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 ...
• 36.4k
755 views

### How to fit B-splines to unstructured grids (triangulated surfaces)?

As a continuation of trying to calculate curvature tensors on triangulated surfaces (here), I am interested in trying other methods. One approach is to use NURBS. To be more precise I would like to be ...
• 4,123
194 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,623
80 views

### What may the arguments be to Region (11.1)?

In Mathematica version 11.1, there is a new function Region. While the Documentation Center page ref/Region has a number of ...
• 12k
375 views

### Anamorphic projection onto the corner of a room

I want to use a router to carve anamorphic projections of polyhedron wireframes onto two adjacent walls of my office. Like this: In order to do this I need to transfer the positions of the vertices ...
• 3,703
796 views

### Death of parallel sub-kernels

EDIT : Finally, the new Mathematica 10.0 seems to fix it. I have a little parallelization problem. I wrote a code to generate a quasicrystal by dynamical generation. Here the code: ...
• 407
65 views

### Memory leak in FindMinValue?

I was running some geometric optimisation code today using FindMinValue and for some reason at one point the memory usage goes upwards of 14GB, making the kernel ...
• 221
163 views

### DelauneyMesh in 4d and higher

Is there any way to find the DelauneyMesh in 4D (or higher)? Its documentation implies that it should be possible "A Delaunay mesh consists of intervals (in 1D), ...
• 4,651
257 views

### How to get 3D building data in map functions?

Most modern mapping APIs have 3D model data for city buildings built-in. For example: Is there some way to get this functionality in the Geography related functions? I believe ...
• 31.7k
132 views

### Is BooleanRegion limited to only the most trivial cases?

Consider these four regions: regions = Disk[#, 1] & /@ Tuples[{0, 4/5}, {2}] Graphics[{FaceForm[Opacity[0.2]], EdgeForm[Black], regions}] I was looking to ...
• 236k
92 views

### ReflectionTransform gives different colors

Consider this example of the cow cow = ExampleData[{"Geometry3D", "Cow"}, "GraphicsComplex"]; p = {0, 0, -0.25} Compare the rotation and reflection ...
• 27.7k
231 views

### ParallelTable slow down, Region functions

I am experiencing speed issues with ParallelTable. There are a few related problems on SX posted here and here, but no resolution. The various respondents to those ...
• 1,800
191 views

### Face-based discrete directional derivative on triangular mesh

For a scalar function $f$ defined on the faces of a triangulated surface $M$, and a vector field $\mathbf{F}$ on its tangent space, is there a built-in or simple way to get the derivative of $f$ in ...
144 views

### How can I tell Mathematica create Heronian triangles in 2D like Maple'post?

I see this post for the generation of triangles in a plane, for which the lengths of all sides, the area and radius of the inscribed circle are integers. In addition, all vertices must have different ...
• 4,307
310 views

### Is there a 3D Voronoi function in Mathematica?

I use Mathematica v11.1. I made a vase by rotating the graph with Mathematica. ...
• 1,748
514 views

### Extending Bresenham's algorithm for subpixel rendering

Original Bresenham's line drawing algorithm it limited to drawing lines between two integer pixel positions and does not allow subpixel rendering. However with my reformulation of this algorithm as a ...
• 62.1k
451 views

### 4 circular arcs, how plot the minimal surface?

By using Sjoerd de Vries code for circular arcs: ...
• 1,159
274 views

### Generating an obstacle-avoiding closed-curve with a fixed perimeter and a target area

I was wondering if there was a neat way to solve the following problem in Mathematica v9 - Provided a binarized image (where we call black pixels "obstacles" or vice versa, whichever is most ...
• 63
111 views

### Placing shapes along a square spiral

Proposed code example is inspired by the main idea of this challenge. Wolfram Language provides great opportunities in computational geometry. But not all of them are equal in terms of speed and ...
• 1,894
68 views

### GeometricScene extremely slow or cannot complete

I would like to find instances of the following dodecahedral wheel generalized to the situation where the red squares become rhombuses. I tried this using RandomInstance[GeometricScene], but ...
• 61
211 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 ...
144 views

### Delaunaymesh boundary effects

I have generated a Delaunay mesh region from the seeds, shown like following: This is a zoomed-in crop image, showing the bottom left corner. The black dots are the seeds. The continuous black lines ...
• 195
91 views

### Better discretization for intersections of algebraic surfaces

I am looking for better, preferably analytical approaches to discretize intersections of algebraic surfaces. When surfaces are not identical, these solutions are either curves or points. An extremely ...
• 19.1k
172 views

### RegionIntersection and area on GeoPosition polygons

I am trying to write a simple procedure to find the percentage of a large property falls in each surrounding ZIP code. A problem that I am encountering is the fact that RegionIntegration[] and Area[] ...
139 views

### Convexity Coefficient Calculation

I would like to probabiistically estimate the convexity coefficient of a MeshRegion, described as - Given a region $\mathscr{K}$, calculate the probability that ...
• 1,800
674 views

### How to make 3D object smooth?

This thread considers mathematical methods here to make the 3D object smooth but this question consider how to achieve the goal of smoothing a 3D object in Mathematica. I want to get smoother ...
• 2,613
130 views

### How can I compute the maximum value of a ConditionalExpression?

If we use GeometricSolveValues in version 14.0, we can use this code to get a ConditionalExpression expr: ...
• 27k
52 views

### Alternatives for GradientFittedMesh and ReconstructionMesh in older versions

Are there similar functions to GradientFittedMesh and ReconstructionMesh, which were introduced in v13, for generating mesh ...
• 55.5k
42 views

### Inconsistence in calculating zero geometric area

First, let us see disk ...
• 17.3k
97 views

### 3D BoundaryMeshRegion Minkowski difference via RegionErosion Failure

I need to be able to produce Minkowski difference of an arbitrary BoundaryMeshRegion and a cylinder. ...
• 417
96 views

### Difference between a region and its convex hull

I have a volume enclosing a certain region. The region is non-convex, and I calculate its convex hull with the built-in Mathematica function. I want to know the difference between the region and its ...
• 177
65 views

### GeometricScene doesn't quite work in v13.0.1

I used GeometricScene in v12.x quite a bit in some project and although the feature was experimental it was reliable before. I recently upgraded to v13.0.1 and had ...
• 5,279
116 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 ...
• 487
137 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 (...
66 views

### Minimal "triangulation"

I have a list of 9 points in $\mathbb{R}^4,$ and I'd like to know the "minimal triangulation" of the convex hull of these points, i.e. the minimal number of 4-dim simplices such that their union gives ...
434 views

### Calculating Gaussian Curvature for an irregular surface

Below is an irregular surface generated from large data and plotted with ListSurfacePlot3D from this data file using columns {3,4,2}. I would like to calculate the ...
• 215
151 views

### ConvexHullMesh fails for collinear points

I've got a List of PointLists, of which some contain only collinear points. I now want to obtain all ConvexHullMeshes of my PointLists. For more than two ...
• 1,077
133 views

### Computing symbolic surface normal of a surface point on a semialgebraic set

Consider a semialgebraic set; such as reg below: ...
• 19.1k
71 views

### How to speed up geometric Resolve query involving $\exists$ and $\forall$?

I would want to test connectedness of semialgebraic sets with naive code like this: ...
• 19.1k
236 views

### Implementation of Lubaehevsky-Stillinger Algorithm to pack hard spheres

To generate a model of a polycrystalline material with specified grain size distribution (e.g coming from a Monte Carlo Grain Growth simulation) the Paper "Effects of grain size distribution and ...
• 2,931
402 views

### Von Neumann's method to generate points uniformly distributed on a region of a n-sphere surface

I am trying to generate points uniformly distributed on a region of a single n-sphere surface (all angles in hyperspheric coordinates are between 0 and Pi/2). I decided to use von Neumann's method ...
• 195
154 views

### projecting a RegionProduct into 3D space

Apparently, RegionProduct should allow you to generate convolution-generated shapes. For instance, take a 1D curve and a sphere, and the region product I would ...
• 743
1 vote
71 views

### Straightening out rumpled striped bedsheets

I was motivated to investigate this from an seeing a Greg's Hurst answer for a different question. I was curious how to find out what the sheet would look like when flattened with proper size and all ...
• 114
1 vote
65 views

### Angle sum at center of a skewed quadrilateral

The center of a discrete quadrilateral on a positive, flat or negative curved surface should make angles sum at center point 2 less than, equal to or more than $360^{\circ}$ respectively, making them ...
• 3,214
1 vote
I have to do some really long computations of basic riemannian geometry. I am trying to use Mathematica to check them. This is the kind of computations I want to do. Let $M$ be a riemannian manifold ...