Skip to main content

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
19 votes
0 answers
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 ...
Rainer's user avatar
  • 2,931
10 votes
0 answers
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 ...
RunnyKine's user avatar
  • 33.2k
8 votes
0 answers
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 ...
Teg Louis's user avatar
  • 114
8 votes
0 answers
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 ...
Pavithran Iyer's user avatar
7 votes
0 answers
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 ...
Las Des's user avatar
  • 807
7 votes
0 answers
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 ...
Greg Hurst's user avatar
  • 36.4k
7 votes
0 answers
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 ...
Dunlop's user avatar
  • 4,123
6 votes
0 answers
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): ...
TumbiSapichu's user avatar
  • 1,623
6 votes
0 answers
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 ...
murray's user avatar
  • 12k
6 votes
0 answers
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 ...
geordie's user avatar
  • 3,703
6 votes
0 answers
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: ...
physicien's user avatar
  • 407
5 votes
0 answers
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 ...
Liam Baker's user avatar
5 votes
0 answers
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), ...
Kvothe's user avatar
  • 4,651
5 votes
0 answers
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 ...
M.R.'s user avatar
  • 31.7k
5 votes
0 answers
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 ...
Szabolcs's user avatar
  • 236k
5 votes
0 answers
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 ...
xslittlegrass's user avatar
5 votes
0 answers
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 ...
flip's user avatar
  • 1,800
4 votes
0 answers
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 ...
Daniel Castro's user avatar
4 votes
0 answers
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 ...
minhthien_2016's user avatar
4 votes
0 answers
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. ...
Milk's user avatar
  • 1,748
4 votes
0 answers
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 ...
Alexey Popkov's user avatar
4 votes
0 answers
451 views

4 circular arcs, how plot the minimal surface?

By using Sjoerd de Vries code for circular arcs: ...
Mats Granvik's user avatar
  • 1,159
4 votes
0 answers
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 ...
TilePath's user avatar
3 votes
0 answers
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 ...
lesobrod's user avatar
  • 1,894
3 votes
0 answers
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 ...
dwoozy's user avatar
  • 61
3 votes
0 answers
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 ...
user avatar
3 votes
0 answers
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 ...
Shuoqi Li's user avatar
  • 195
3 votes
0 answers
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 ...
kirma's user avatar
  • 19.1k
3 votes
0 answers
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[] ...
yourPublicDisplayName's user avatar
3 votes
0 answers
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 ...
flip's user avatar
  • 1,800
3 votes
0 answers
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 ...
hhh's user avatar
  • 2,613
2 votes
1 answer
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: ...
yode's user avatar
  • 27k
2 votes
0 answers
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 ...
Ulrich Neumann's user avatar
2 votes
0 answers
42 views

Inconsistence in calculating zero geometric area

First, let us see disk ...
matheorem's user avatar
  • 17.3k
2 votes
0 answers
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. ...
Anton's user avatar
  • 417
2 votes
0 answers
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 ...
akr's user avatar
  • 177
2 votes
0 answers
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 ...
Taiki's user avatar
  • 5,279
2 votes
0 answers
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 ...
Math Gaudium's user avatar
2 votes
0 answers
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 (...
William Taylor's user avatar
2 votes
0 answers
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 ...
clementine's user avatar
2 votes
0 answers
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 ...
newstudent's user avatar
2 votes
0 answers
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 ...
DPF's user avatar
  • 1,077
2 votes
0 answers
133 views

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

Consider a semialgebraic set; such as reg below: ...
kirma's user avatar
  • 19.1k
2 votes
0 answers
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: ...
kirma's user avatar
  • 19.1k
2 votes
0 answers
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 ...
Rainer's user avatar
  • 2,931
2 votes
0 answers
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 ...
Sasha's user avatar
  • 195
2 votes
0 answers
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 ...
lurscher's user avatar
  • 743
1 vote
0 answers
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 ...
Teg Louis's user avatar
  • 114
1 vote
0 answers
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 ...
Narasimham's user avatar
  • 3,214
1 vote
0 answers
173 views

Computations on differential geometry

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 ...
davidivadful's user avatar