# Tagged Questions

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

173 views

### User-defined DistanceFunction for RegionNearest

In the function Nearest , I can define my custom function using the DistanceFunction option. e.g: ...
234 views

### Decomposition of a semialgebraic set into connected components

Is there any built-in function for doing decomposition of a semialgebraic set into connected components? The only way I now can think of is to use ...
185 views

### Why RegionDifference cannot work normally?

Bug introduced in 10.0 and fixed in 10.4 Given that two polygons regions as below: ...
528 views

### How to draw quantum circuit with mathematica?

How to draw quantum circuit as the following one with mathematica? I only find the quantum package which is designed for MMA 7.0 as the author said. But the version of my Mathematica is 9.0 and when ...
82 views

### Defining a MeshRegion from a list of points and Polygons with duplicate points does not work in 10.4

Bug introduced in 10.4 and persists through 10.4.1 This code produces a MeshRegion in versions 10.0 through 10.3.1, ...
392 views

### Finding the two points on a heart-shaped curve which have maximal distance between them

The question originates from Max & min distance between two moving points. I think it can be solved easily because of the function is a parametic function. My heat-shaped curve is given by ...
1k views

### Generating a non-convex polyhedron from a list of vertex coordinates

I want to include a figure in a paper I am writing on Combinatorial Geometry which features a non-convex polyhedron given by the following vertices, EDIT: I was unaware that Mathematica could convert ...
252 views

### Lloyd relaxation on VoronoiMesh

How can we apply Lloyd's relaxation algorithm to a VoronoiMesh? Thanks. UPDATE Thanks a lot KennyColnago for your answer. Based on Simon Woods suggestion of ...
3k views

### Delaunay Triangulation for 3D Surface Data

I want to do a Delaunay triangulation on scattered 3D surface data. Mathematica itself does it only for 2D through the command DelaunayTriangulation[], which gives ...
3k views

### How to check if a 3D point is in a planar polygon?

Following up on ndroock1's question, I naively tried to apply the solutions to a 3D point and polygon and they didn't work. For example, functions involving ArcTan ...
982 views

### Voronoi Diagram: Displaying site specific color in a voronoi diagram

I am using Voronoi Poligonization as a support form simulating island erosion; my data are the output of VoronoiDiagram, ...
701 views

### Finding concave hull for separated small clusters

Data : data3D = Import[file, "VertexData"]; Graphics3D[Point[data3D]] How to find concave polygon for separated small clusters.
262 views

### A question regarding “DiscretizeGraphics”

I want to find the volume of a torus torus = RevolutionPlot3D[{2 + Cos[t], Sin[t]}, {t, 0, 2 Pi}] ...
205 views

### DiscretizeGraphics and BoundaryDiscretizeGraphics Fail on CapsuleShape and SphericalShell

It seems the new Graphics3D primitives have some incomplete features. Earlier, I uncovered a problem with computing their exact surface area see here. Now, I ...
192 views

### How do I get ConvexHullMesh to return polygons instead of triangle as surface mesh?

I would need to identify the types of regular polygons forming the surface of a convex hull of 3D points. If I e.g. take the following example of a regular polyhedron ...
144 views

### Why is RegionMeasure so slow when calculating intersection area of a 2D and a 3D object?

If you think this description is too long, you can read the problem directly I know normally when one wants to calculate an region, this guide is useful. However, when it comes to calculating an ...
252 views

### Finding corresponding vertex from 3d to 2d

I have this simple 3d data points: ...
150 views

### How to convert a graph to a mesh region

As we know,the region is very convenient in Mathematica.And we can convert a MeshRegion into graph like this ...
1k views

### Construct a simple mesh or tetrahedral mesh from 3D image surface

I have a 3D Y-Shape hollow tube, not so good surface. Import["http://dl.dropbox.com/u/68983831/tube02.vtk", "Graphics3D"] I tried to use following vertex data ...
279 views

### Can't plot rotated region

I was experimenting with the code from this question when I ran into another problem with regions. ...
425 views

### Smooth convex hull of a large data set of 3D points

I recently needed to deal with a large data set of 600.000 points in three dimensions. My task was to find a convex hull for this data. I have Mathematica 10, so I could use the function ...
70 views

### DiscretizeRegion fails for a triangular region

I define an implicit region like R = ImplicitRegion[ 0 < Sin[u]/Cos[v] < 1 && 0 < Sin[v]/Cos[u] < 1, {{u, 0, 2}, {v, 0, 2}}] But when I ...
196 views

### A method to discretize a three-dimensional solid

Consider the following region: ...
83 views

### RegionIntersection: Point or Line?

This may be a minor point, but I'm wondering why RegionIntersectionof the two rectangles below gives 3 Lines rather than 2 Lines and 1 Point. ...
1k views

### Choosing $n$ equidistant points on a circle with given radius and center

I would like to have a function circle which takes two inputs: a tuple {x,y} and a real number ...
222 views

### Getting ordered coordinates out of ConvexHullRegion

I'm trying to get the ordered coordinates of a convex hull using MeshCoordnates[ConvexHullMesh[data]], but the coordinates are uselessly out of order: ...
250 views

### Speed of ConvexHullMesh

Pick $N$ random points on the surface of the sphere, then use ConvexHullMesh[] to compute their convex hull. Empirically, this takes time quadratic time in $N,$ ...
4k views

### Mathematica function intersection points with 3D grid

I need to produce a 3-dimensional equispaced grid over a given function in a way, that I can calculate intersection points of the function with the grids edges. So my first question is how to produce ...
706 views

### How to find the vertices of a regular tetrahedron? a dodecahedron?

My question is: how to find the coordinates of the vertices of regular tetrahedron and dodecahedron? I tried to find the coordinates of the vertices of a regular tetrahedron as the solutions of a ...
249 views

### Discretizing regions with pointy boundaries

I'm trying to discretize a region with "pointy" boundaries to study dielectric breaking on electrodes with pointy surfaces. So far I've tried 3 types of boundaries, but the meshing functions stall ...
204 views

### Need help on the proper use of a formula to produce a cambered airfoil

Following the book on "The Theory of Thin Wing Sections" page #112 describes the method to combine a camber line (i.e Mean Line) and a thickness distribution to form a cambered wing section. Data ...
1k views

### Extracting polygons from 3D contour plot surface

Edit: This question turned out to be two parts so I am going to make this question about only the first part a kguler provided an excellent answer. Here is a better representation. My actual data ...
209 views

### Can one use MeshRefinementFunction to obtain a nonobtuse triangulation?

I have a planar convex polygonal region Rc. I would like to triangulate it such that every triangle is nonobtuse. I was hoping that the ...
278 views

### “The function DiscretizeGraphics is not implemented for GraphicsComplex” confusion

Why does DiscretizeGraphics seems to work on one GraphicsComplex and not the other? Here is an example that works: ...
136 views

### Voronoi diagram using RegionPlot, using the hyperbolic metric

I want to compute the Voronoi diagram on the unit disk, using the hyperbolic metric. So, I want to input a list of points and obtain a plot of the cells associated with each of the points. I defined ...
265 views

### ToElementMesh problem on Ball defined by ImplicitRegion?

Bug introduced in 10.0 and fixed in 10.2 Could any one please confirm the following bug in mathematica 10.0.2 ? If I define this ball ...
344 views

### How do I get a MeshRegion from an obj file, or from Geometry3D

How do I read in an obj file as a MeshRegion so I can e.g. compute its area? If I just import the object and try Area[O] it ...
298 views

...
748 views

### Collision detection algorithm (discrete) with sweep and prune algorithm

For a more complex collision detection approach, I need an efficient (aka fast) algorithm to prune the elements by using boundary boxes. A classical algorithm is the so called sweep and prune (SAP) ...
140 views

### How to generate higher dimensional convex hull?

I like the function ConvexHullMesh very much, since I often need to take a look at the convex hull of points in 2D and 3D, which as an example can be generated and ...
158 views

### Test existence of a path from one side of a graph to another

I'm trying to determine how I can test if a path exists from one side of a graph to another as efficiently as possible. If I have the Lines given by: ...
124 views

### Error from BoundedDiagram

I cannot understand the meaning of the error BoundedDiagram::notuniq: BoundedDiagram requires that boundary vertices lie in unique Voronoi polygons. >> BoundedDiagram::nobd: Bounded ...
98 views

### Expensive MeshRefinementFunction

I want to discretize a region using DiscretizeRegion. Now, I want the mesh to be more refined, when the curvature of a certain function ...
2k views

### Calculating a minimum bounding box for a set of 3-space coordinates / spheres

I have a set of 3-space coordinates for the atoms of a molecule (I could also transform them into spheres with radii corresponding to the atoms they represent). I would like to place this molecule ...
195 views

### How to draw Kobon triangles

I would like to know if Mathematica is capable of constructing Kobon triangles; that is, a figure consisting of the largest number of non-overlapping triangles that can be constructed using $n$ lines, ...
332 views

### Behavior of GraphicsMeshInPolygonQ with self-intersecting polygons

Playing around with some of the answers in the question How to check if a 2D point is in a polygon? I noticed that: GraphicsMeshInPolygonQ[poly,pt] Displays ...
286 views

### Obtain polygons describing all intersections of many polygons

I have 6894 polygons describing zones in a state plane (i.e., cartesian) coordinate system. Most are not very complex, and I believe none have holes. A random example is Polygon[{{351633., 564236.}...
163 views

### Numerical Functions Compatible with Regions Fail with MeshRegions and BoundaryMeshRegions

Bug introduced in 10.0.0 and fixed in 10.0.2 Given a MeshRegion: region = DelaunayMesh[RandomReal[1, {50, 3}]] We can ...