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.

101 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,861
10 votes
0 answers
238 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
  • 32.9k
7 votes
0 answers
142 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
181 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
  • 35.5k
7 votes
0 answers
679 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
  • 3,923
7 votes
0 answers
581 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
6 votes
0 answers
78 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
  • 11.8k
6 votes
0 answers
356 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,683
6 votes
1 answer
853 views

Region Intersection for MeshRegion objects embedded in 3D

How can I create a logical intersection of MeshRegion objects that are three-dimensional? The RegionIntersection function will ...
Katia's user avatar
  • 61
6 votes
0 answers
777 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
184 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,593
5 votes
0 answers
140 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,197
5 votes
0 answers
239 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.2k
5 votes
0 answers
128 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
  • 233k
5 votes
0 answers
90 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
224 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
303 views

Is there a 3D Voronoi function in Mathematica?

I use Mathematica v11.1. I made a vase by rotating the graph with Mathematica. ...
Hoony's user avatar
  • 1,520
4 votes
0 answers
496 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
440 views

4 circular arcs, how plot the minimal surface?

By using Sjoerd de Vries code for circular arcs: ...
Mats Granvik's user avatar
  • 1,149
4 votes
0 answers
270 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
208 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
140 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
  • 185
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
  • 18.7k
3 votes
0 answers
167 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
136 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
670 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,593
2 votes
0 answers
40 views

Inconsistence in calculating zero geometric area

First, let us see disk ...
matheorem's user avatar
  • 17k
2 votes
0 answers
104 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,197
2 votes
0 answers
88 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
  • 345
2 votes
0 answers
59 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,209
2 votes
0 answers
108 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
58 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
  • 51
2 votes
0 answers
134 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
65 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
417 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
149 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,067
2 votes
0 answers
125 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
  • 18.7k
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
  • 18.7k
2 votes
0 answers
230 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,861
2 votes
0 answers
397 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
153 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
69 views

Subtract ParametricRegions from each other

I have 2 surfaces defined parametrically that overlap. I want to subtract the helical surface from the cylindrical surface to obtain a mesh of just the blue surface in the image. The parameter bounds ...
Ariana Fenris's user avatar
1 vote
0 answers
62 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
  • 2,992
1 vote
0 answers
68 views

Grouping vectors into groups of 3 by attribute

Three groups are given, each with eight $3 \times3$-vectors: ...
dtn's user avatar
  • 2,374
1 vote
0 answers
77 views

Determine if intersection of Polygon and HalfLine is non-empty

I have a concrete example: ...
Per Alexandersson's user avatar
1 vote
0 answers
69 views

RandomInstance of GeometricScene producing unexpected result

Consider the following scene as an example: ...
user13892's user avatar
  • 9,113
1 vote
0 answers
155 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 ...
Dennis's user avatar
  • 437
1 vote
0 answers
62 views

Why does ConvexHullMesh give inconsistent output stuctures?

I know much of the stuff in ConvexHullMesh needs some TLC convexhullmesh-inconsistency But, can anyone see why this would produce inconsistent output: Case 1 (expected behavior): ...
Craig Carter's user avatar
  • 3,968
1 vote
0 answers
49 views

An apparent bug in Geometry`ConvexHull2

I was replacing some usages of Geometry`ConvexHull2 with ConvexHullMesh and found one of my tests failing. It turned out the ...
Vladimir Reshetnikov's user avatar