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
2answers
67 views

MeshRefinementFunction missing points

I'm doing some FEM on a rectangular region with a spherical cavity: ...
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 ...
14
votes
1answer
266 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
216 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 ...
25
votes
2answers
891 views

Movable text on a curve

Having an arbitrary curve defined as InterpolatingFunction, what is the best way to place a text on this curve? The text generally has two rows, for example: ...
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
145 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 ...
0
votes
0answers
108 views

Random generation of three-non-collinear and four-non-coplanar points in 3D space

Please, take a look to this code. How it can be improved so that the time execution becomes smaller? ...
4
votes
1answer
1k views

How to split compound polygons into convex polygons?

Is it possible to split non-convex polygons into convex plygons with Mathematica 9? For example: ...
29
votes
3answers
1k views

Can Mathematica solve Plateau's problem (finding a minimal surface with specified boundary)?

Given a closed curve $\mathcal C$ in three dimensions, is it possible to use Mathematica's built-in functionality to compute a minimal surface whose boundary is $\mathcal C$? For simplicity, let us ...
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
324 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
87 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 ...
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: ...
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, ...
29
votes
4answers
4k views

Creating a 2D meshing algorithm in Mathematica

As what is proving to be a difficult, but entertaining task, I am attempting to adapt a 2D meshing algorithm created for MATLAB and port it to Mathematica. I understand meshing functions already exist ...
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 ...
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 ...
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 ...
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: ...
6
votes
7answers
956 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 ...
7
votes
2answers
136 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 ...
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: ...
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 ...
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 ...
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 ...
3
votes
1answer
63 views

MaxCellMeasure fails in 3D?

Question How come MaxCellMeasure works in 2D but fails in 3D? Indeed if I try ...
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: ...
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 ...
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 ...
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
237 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 ...
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
151 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: ...
17
votes
5answers
1k views

Insphere for Irregular Tetrahedron

I am looking for existing Mathematica code to compute the unique sphere inscribed inside an irregular tetrahedron. I can write it myself, but I would love to find that someone already performed this ...
1
vote
0answers
105 views

Mathematica Numeric Output [closed]

I'm using Mathematica to compute barycentric coordinates, and the output for my points is not being computed, but rather it just shows it in the form that I inputted as. For example, I have: ...
11
votes
2answers
425 views

Probable Bug in ConvexHullMesh

Bug introduced in 10.0 and persisting through 10.2 or later Consider points taken from the following parametric plot. See this question ...
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 ...
11
votes
2answers
225 views

Probable Bug in HighlightMesh with 2D Convex Hulls created via ConvexHullMesh

Bug introduced in 10.0 and fixed in 10.2 One nice way to view the new and exciting Mesh objects introduced in Version 10 is by utilizing the function ...
12
votes
2answers
265 views

Possible Bug in DiscretizeRegion with Option MaxCellMeasure

Bug introduced in 10.0.0 and fixed in 10.0.2 Consider the following ImplicitRegion: ...