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

learn more… | top users | synonyms

4
votes
0answers
84 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 ...
3
votes
3answers
246 views

Help with finding the point(s) inside a closed shape with the highest average ray length?

I am trying to find the point(s) with the highest average ray length of any implicit relation that is closed shape (ex. $x^2+y^2+\sin(4x)+\sin(4y)=4$). I have some idea of how to mathematically ...
12
votes
3answers
474 views

How to find the outline of a country given the imperfect outlines of its administrative subdivisions?

I have a larger outline divided into several regions. While my data represents something else, let us think of this as the provinces/counties of a country, for the sake of simplicity. This is, for ...
5
votes
2answers
197 views

Separate boundaries of multiply connected region

I have a multiply connection two-dimensional region such as the following: br = BoundaryDiscretizeGraphics@Graphics[Disk[#, 8/9] & /@ CirclePoints[9]] I am ...
5
votes
2answers
222 views

RegionPlot of ImplicitRegion is incorrect

Bug fixed in 10.4. Why does RegionPlot of the ImplicitRegion give an incorrect plot? Also, will how does this affect ...
14
votes
2answers
251 views

Why is DiscretizeGraphics missing points on my curve?

I have a graphics expression which renders nicely as a closed curve when put in Graphics, I don't understand why I can't get the lines from DiscretizeGraphics or ...
5
votes
1answer
117 views

Minimal perimeter of all possible polygons

We had a fun problem for a student activity today: Let $P(z) = z^8 + \left(4\sqrt{3} + 6\right)z^4 - \left(4\sqrt{3} + 7\right)$. What is the minimum perimeter among all the $8$-sided polygons in the ...
13
votes
2answers
408 views

How to determine whether a point is within a polygon in Mathematica 10

In Mathematica 9, I was able to use the function Graphics`Mesh`InPolygonQ to determine whether a given point was within a polygon. How do I do this in Mathematica ...
3
votes
3answers
403 views

intersection between polygon. Algorithm to check it [closed]

I'm working on an algorithm which should check if two polygons, described by their vertex coordinates, are: one inside the other, are intersecting or are separated image below describe this three ...
6
votes
1answer
97 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 ...
6
votes
1answer
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, ...
2
votes
2answers
246 views

n equidistant points on circumference of an Ellipse [duplicate]

I want to generate a list of n coordinate points which are on the circumference of an ellipse. I wrote this code: ...
7
votes
2answers
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 ...
3
votes
0answers
85 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 ...
0
votes
1answer
100 views

How to add Polygons (using existing Lines and Points) to MeshRegion?

I have a MeshRegion N with Points and Lines, but without Polygons. That means that MeshCells[N, 2] returns ...
5
votes
1answer
159 views

Intersecting cones for weighted Voronoi diagram - DiscretizeRegion was unable to discretize the region

I want to make a diagram (and also a Graph of the vertex + edge config) of the orthogonal projection of the intersections of a set of conical surfaces in order to ...
0
votes
0answers
63 views

Find the maximum hyperrectangle contained in a set of points

I have a question similar to this one ( Find the largest rectangular block satisfying some condition without iterating explicitly). but in my case I have a multidimensional (up to 6 dimensions) binary ...
4
votes
2answers
153 views

How to take something from DelaunayMesh and similar family of functions

I was looking at this question here and I tried the suggested idea by Anton Antonov to use DelaunayMesh It will look like this: ...
16
votes
2answers
300 views

How to implement Bresenham’s algorithm as a system of equations?

Bresenham's line drawing algorithm is usually implemented via loops. But in Mathematica we can take advantage of its ability to solve Diophantine equations. From educational viewpoint it is quite ...
21
votes
2answers
674 views

Convert binary voxel image to geometric region

I have a binary voxel image which described a contiguous region in space. Example: ...
21
votes
4answers
525 views

Find the volume of Phobos and Deimos

How can we calculate the volume of a 3D object using the new-in-10 computational geometry functions? For simple objects this works: ...
7
votes
3answers
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 ...
2
votes
1answer
160 views

Intersecting cone surfaces

Given two cone surfaces with common vertex O in 3D: Given are: Coordinates of point O Vectors OP, OL (OL is height for the green cone), OR (height of the blue cone), OC I would like to know the ...
11
votes
1answer
337 views

Can I get the curvature at any point of a random curve?

Random curve like the above, for example. The data source is an image file. I don't have an expression. I want to start by curve fitting and then compute curvature. Is it possible?
12
votes
2answers
334 views

How to make geometric intersection faster for geographic borders?

I have developed a solution to identify geographic regions bordering a region in this post (94723). Can this functionality be made to execute any faster? Find which entities in a set border other ...
14
votes
4answers
261 views

Administrative Divisions bordering a geographic region (e.g. an ocean)

Update 3 I've worked out a solution that is bearable for a small number of subregions in the neighbour and added it as an answer. I'm going to make a post for optimisation help. Update 2 For a ...
7
votes
2answers
196 views

A method to discretize a three-dimensional solid

Consider the following region: ...
11
votes
1answer
220 views

Is DiscretizeRegion not yet ready ro discretize 3D-solids?

In the DiscretizeRegion documentation: "The region reg can be anything that is ConstantRegionQ and RegionEmbeddingDimension less than or equal to 3." With DiscretizeRegion there could be an easy way ...
2
votes
0answers
197 views

Intersecting RegionPlots [closed]

Does the Mathematica graphics system have any concept of intersecting regionplots? I've found about intersecting graphics but not regionplots so far. For example, if I want to show the intersection of ...
0
votes
1answer
105 views

DSolve Error 3D Navier Stokes (z,r,t)

I am essentially wanting to solve Navier Stokes in the [z,r,t] dimensions (2D+Unsteady Flow) for pressure driven flow. However, I keep getting an error I am unable to resolve in my Dsolve such as: ...
2
votes
1answer
98 views

Clean & efficient bounding box non-intersection test

I would like a quick test to tell me that segments $ab$ and $cd$ cannot intersect in the plane. If the maximum $x$-coordinate of $a$ and $b$ is less than the minimum $x$-coordinate of $c$ and $d$, ...
8
votes
2answers
325 views

DelaunayMesh in a specified closed region - creating a concave hull from a set of points

I have a list of discrete points wich I want to use as nodes for creating a 2D mesh. I used DelaunayMesh and it works fine. The problem that I have is that some elements/polygons are outside of the ...
7
votes
1answer
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 ...
10
votes
2answers
146 views

Possible Bug in Computing Surface Area of Certain Geometric Regions

Mathematica 10.2 introduced some new geometric regions. Two of the new regions include SphericalShell and CapsuleShape. ...
6
votes
0answers
135 views

Possible Bug with Options in DelaunayMesh

Bug introduced in 10.2 and persisting through 10.4 Update: It turns out after some testing, none of the Options work in ...
1
vote
1answer
119 views

How to reconstruct a surface given points {x, y, z} and the surface normals {nx, ny, nz} at these points

I have 3D points above a 2D regular grid. At those points I know the normal vector of the surface. I am looking a command or function in Mathematica, like ...
0
votes
0answers
41 views

Finding intersection of two infinitely long lines using points [duplicate]

EDITED In the Find intersection of pairs of straight lines problem, it is assumed that line are intersected by default and the purpose is to find the intersection points. In the present problem, two ...
7
votes
1answer
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 ...
3
votes
0answers
87 views

Simple ways to implement vector dilation

Suppose we have a singly connected but not necessarily convex polygon. Something like shape = CountryData["Chad", "Coordinates"]. Is there a simple way to ...
3
votes
1answer
75 views

MaxCellMeasure fails in 3D?

Question How come MaxCellMeasure works in 2D but fails in 3D? Indeed if I try ...
2
votes
1answer
139 views

ToElementMesh fails on DodecahedronIcosahedronCompound

Context I would like to compute the eigenmodes of a DodecahedronIcosahedronCompound. Why? Because it is cool! and I wonder how it rings… Starting with: ...
14
votes
3answers
354 views

How to convert a surface into a solid

Context I am interested in converting surfaces into solids (so I can make a 3D mesh out of them using ToElementMesh) Say I have the following cool surface ...
6
votes
2answers
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 ...
4
votes
1answer
116 views

Defining a region from combination of data and geometric region

I would like to define a region in (x,y) by combining the region RegionPlot[ ImplicitRegion[ Sqrt[x^2 + y^2] <= 0.99, {{x, 0.01, 0.99}, {y, 0.01, 0.99}}]] ...
11
votes
2answers
224 views

VoronoiMesh without edges

How can I remove the edges of a VoronoiMesh? I would like to display only the closed cells not touching the border of the image. This is my binarized source image (imgbw): I am doing this: ...
4
votes
1answer
128 views

ConvexHullMesh sometimes excludes valid points from convex hull

I have a sequence of polytopes that I am trying to visualize, and I find that ConvexHullMesh sometimes excludes points from the convex hull, and it does so inconsistently. In particular, notice these ...
5
votes
1answer
173 views

How to fill the closed region by ParametricPlot with solid color?

I am interested in the following implicit curve with parametric equation: $$ \left\{\quad \begin{array}{rl} x=& 9 \sin 2 t+5 \sin 3 t \\ y=& 9 \cos 2 t-5 \cos 3 t \\ \end{array} \right. $$ ...
42
votes
2answers
1k views

Numerically solving Helmholtz equation in 3D for arbitrary shapes

Context While studying manifold Learning I got interested in finding the eigenvectors of the Laplacian. (also in connection to this problem of solving the heat equation) Following this and that ...
4
votes
0answers
257 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 ...
6
votes
1answer
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 ...