Questions on constructing graphical objects using relatively complex computations relating to the mathematical structures defining those objects. Examples include convex hulls, mathematical constructions, symmetries, genuses of curves and graphs and programmatic constructions of polyhedra.

learn more… | top users | synonyms

3
votes
1answer
32 views

MeshRefinementFunction missing points

I'm doing some FEM on a rectangular region with a spherical cavity: ...
14
votes
1answer
265 views

GeoGraphics : path within a country

I am using GeoGraphics to visualize electricity distribution networks in certain countries. I have susbtation location data, as well as network incidence matrices ...
4
votes
0answers
53 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
215 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 ...
10
votes
3answers
419 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
179 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
143 views

RegionPlot of ImplicitRegion is incorrect

Why does RegionPlot of the ImplicitRegion give an incorrect plot? Also, will how does this affect calculations with ...
13
votes
2answers
215 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
96 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
322 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
325 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
86 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 ...
4
votes
0answers
122 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
219 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
135 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
58 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
84 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
114 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
45 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 ...
3
votes
2answers
120 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
275 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 ...
20
votes
2answers
566 views

Convert binary voxel image to geometric region

I have a binary voxel image which described a contiguous region in space. Example: ...
18
votes
3answers
433 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: ...
5
votes
3answers
142 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
128 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
236 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?
0
votes
0answers
45 views

solve ray intersection with plane on gpu?

I'm ray-tracing a bunch of rays with random direction from a single point to a fixed plane via a curved surface. The time consuming part is finding the intersection of the initial rays with the curved ...
11
votes
2answers
303 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 ...
13
votes
4answers
219 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
172 views

A method to discretize a three-dimensional solid

Consider the following region: ...
10
votes
1answer
177 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
150 views

Intersecting RegionPlots

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
83 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
92 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$, ...
4
votes
1answer
96 views

DelaunayMesh in a specified closed region

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
184 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
137 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
101 views

Possible Bug with Options in DelaunayMesh

Update: It turns out after some testing, none of the Options work in DelaunayMesh when 3D point sets are involved. Original ...
1
vote
1answer
113 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
37 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
127 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
73 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
63 views

MaxCellMeasure fails in 3D?

Question How come MaxCellMeasure works in 2D but fails in 3D? Indeed if I try ...
2
votes
1answer
118 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: ...
10
votes
2answers
208 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
201 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 ...
3
votes
0answers
87 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}}]] ...
10
votes
2answers
181 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: ...
3
votes
1answer
100 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
146 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. $$ ...