Questions about functionality that defines or operates on regions (i.e., an open, connected set), including geometric, mesh-based, or data and formula-defined regions.

learn more… | top users | synonyms

32
votes
5answers
816 views

obtaining random element of a set given by multiple inequalities

I try to obtain random elements from a set given by multiple inequalities. This is of general interest to me, but let me present one example here: I have multiple inequalities specifying half spaces ...
34
votes
8answers
2k views

How to generate random points in a region?

The Mathematica 10 documentation was updated for FindInstance adding support for regions. In my use case, I'm trying to sample points in a set of disks: ...
13
votes
3answers
1k views

Generating hatched filling using Region functionality

Before v.10 came out there were several Q&A on generating hatched filling for Plot, ListPlot etc. In v.10 we have new ...
11
votes
1answer
231 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 ...
12
votes
2answers
514 views

Ideas on how to improve the rendering of the letter B in this 3D region plot?

I have been playing with the RegionPlot3D idea from this question and have been trying to approximate the Gödel, Escher, Bach logo, but I am a little bit stuck on how to improve the rendering of the ...
7
votes
3answers
132 views

1D ImplictRegion can not be plotted with RegionPlot

I am using Mathematica 10.4 In the documantion page of ImplicitRegion, there is an example ...
15
votes
2answers
2k views

Neumann boundary conditions in NDSolve over nontrivial region

The problem I would like to solve involves diffusion in the following region ...
21
votes
2answers
705 views

Convert binary voxel image to geometric region

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

Showing a rectangular plot on an almost-closed sphere

I am currently teaching some students about the "point at infinity", and how it allows us to treat circles and lines as "the same", etc. I would like to kind of show this happening with a series of ...
13
votes
2answers
875 views

Controlling quality of discretized region meshes

EDIT: Impact of this problem has been considerably lessened in v10.2. Although new version is still not performing analytical discretization at sharp corners (there are jaggies), evenness of sampling ...
11
votes
1answer
3k views

Using RegionFunction on multiple plots

I realize that the Plot function can plot multiple functions of x at the same time, using { }. I also know that the ...
9
votes
1answer
231 views

How to discretize a BezierCurve?

Bug introduced in version 10.0 and persisting through 10.4 DiscretizeGraphics is new in 10.0. I need to create a discretized region from a ...
17
votes
0answers
309 views

RegionPlot returning a number

Bug introduced in 10.0 and persisting through 10.4 or later I had updated my mathematica to version 10 few days ago. And I had been shocked by the following fact: ...
8
votes
2answers
214 views

RegionIntersection puzzle

I am using RegionIntersection[] to intersect two rectangles, phrased as Polygon[]s: ...
7
votes
1answer
284 views

Can't plot rotated region

I was experimenting with the code from this question when I ran into another problem with regions. ...
6
votes
2answers
257 views

Simplify 2D polyhedral Regions like Interval

I don't think there's a built in "RegionSimplify" for polyhedral Regions and derived akin to how Interval automatically simplifies its argument expression: ...
5
votes
2answers
167 views

NMinimize in one-dimensional Interval

An Interval should be a one-dimensional region, so a region. I tried to minimize a function over an interval, e.g.: ...
3
votes
2answers
134 views

Reflecting lines in ellipses: speed up the code?

I have the following code which calculates a list of points that a line would take after bouncing off various ellipses. ...
3
votes
1answer
153 views

Minkowski sum and product of 2D-regions

Let $A_j$, $j=1,\dots,n$ be subsets of $\mathbb C$ defined by $$ A_j=\{z\,|\,f_j(z)\geq0\} $$ where $f_j:\mathbb C\to\mathbb R$ are given functions. I am interested in the following subsets of $\...
8
votes
1answer
128 views

TransformedRegion, RegionPlot broken in 10.0.2.0?

After having had trouble applying TranslationTransform to a simple region like so ...
7
votes
1answer
142 views

Area of a image region

I've applied Mathematica to the problem of estimating the area of an estuary, but when I got the results I wasn't able to understand in which unit of area it was given. My approach is the following: ...
3
votes
2answers
198 views

How to Discretize a Tube

In Is there a way to outline text?, I was amazed that BoundaryDiscretizeGraphics can discretize a Text primitive. So in a ...
2
votes
4answers
300 views

How to embed a filled Region in a Graphics?

Let for example: regn = RegionDifference[Rectangle[{-2, -2}, {2, 2}], Disk[{0, 0}, 1]]; The only documented way I found to draw a gereric region ...
2
votes
3answers
128 views

Create region from polygons and tangential line segments

I have two circles and tangential line segments that I want to define a region: ...
23
votes
5answers
1k views

Rounding the Corners of a Shape

I was wondering whether there is an option in Mathematica that enables me to smooth the corners of a shape. The example I want to start with is the pentagon. This can be crudely specified as ...
12
votes
2answers
846 views

How to create subregions for the NDSolve FEM Solver

I am trying to create a 2d region consisting of two subregions. The inner region has several holes, where boundary conditions are applied. The figure shows the idea. I have tried to create this ...
21
votes
4answers
537 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: ...
12
votes
1answer
164 views

RegionNearest and neighborhoods

In this previous question we see that RegionNearest isn't quite as 'capable' as Nearest for some things. Similarly, I need to ...
14
votes
2answers
256 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 ...
9
votes
4answers
686 views

How discretize a region placing vertices on a specific non-uniform grid

Given a generic region, for example: Ω = ImplicitRegion[ 2 x^2 + 3 y^2 + 2 x y - 2 <= 0 ∧ x^2 + y^2 > .1, {x, y}]; and a non-uniform grid, for ...
25
votes
5answers
2k views

Generate two random numbers with constraints

I want to generate two random numbers, $p$ and $q$, between $0.5$ and $1$. They are connected by the constraint $1/(2q) > p$. How do I generate $p$ and $q$?
8
votes
2answers
149 views

How to assign Element marker at boundary edges

How to assign marker at the boundary edges as 1, 2, 3, 4 respectively and set all of the inside elements of region as 0? for example: Code: ...
7
votes
1answer
167 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 ...
7
votes
2answers
233 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 ...
7
votes
1answer
224 views

Problem with DiscretizeRegion

Bug fixed in 10.1.0 ...
6
votes
0answers
184 views

RegionPlot, RegionPlot3D and differing embedding dimensions

RegionPlot seems to be for plotting regions with an embedding dimensions of 2 only, and RegionPlot3D for regions with an ...
6
votes
2answers
392 views

Join Two Element Meshes

Let's say I have two element meshes defined as the following: ...
5
votes
2answers
203 views

How to create a surface mesh embedded in 3D?

I am working on a problem where I want to optimize current densities on 2D surfaces embedded in 3D to generate magnetic fields. The current density on a surface can be written as a scalar function ...
5
votes
1answer
106 views

RegionPlot not plotting some regions

RegionPlot appears to have regressed in version 10.4 In 10.3.1 RegionPlot[ImplicitRegion[x^2 + y^2 == 1, {x, y}]] gives ...
5
votes
3answers
126 views

ImplicitRegion gives arbitrary boundaries

This question uses Mathematica 10.2.0.0. equation1 is the major unbounded region I would like to generate: ...
4
votes
5answers
555 views

How to plot a 2D region when there are 3 free parameters?

How could I obtain the region of payments, with the parameters a,b,c,d between 0 and 1 and the sum of all equals 1? After the comment/recommendation of belisarius... I edit the original question and.....
1
vote
2answers
789 views

3D Contour Plot parts of sphere with gradient less than 0, equal to 0 and more than 0

I want to plot only parts of the sphere of radius 1 where the gradient $\frac{\partial z}{\partial x}$ is < 0, = 0 and > 0. The full sphere is given by: ...
10
votes
2answers
147 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. ...
8
votes
2answers
123 views

Behaviour of RegionDistance with Ellipse?

The data is: data = {{13, 60}, {36, 35}, {70, 29}, {106, 41}, {118, 72}, {94, 94}, {49, 99}, {24, 85}}; When I try to find a fit circle,So my method is work ...
7
votes
3answers
1k views

Region bounded by x^2+y^2=1, y=z, x=0, z=0, in first octant

I need to draw (pencil and paper) the region bounded by $x^2+y^2=1$, $y=z$, $x=0$, and $z=0$ in the first octant. So the first assistance I asked of Mathematica is: ...
6
votes
1answer
163 views

Easy FindMaximum returns a wrong answer

FindMaximum in region is a new function in mma10,but when I tried the following example: ...
5
votes
2answers
140 views

MeshRefinementFunction missing points

I'm doing some FEM on a rectangular region with a spherical cavity: ...
3
votes
4answers
221 views

Find the volume of the region defined by $|x|+|y|+|z|<4$

I want to find the volume of the region defined by the following inequality: $\quad \quad |x|+|y|+|z|<4$ In addition to calculating the volume of this region, I would also like to be able to ...
3
votes
2answers
88 views

How to apply `DiscretizeGraphics` to a tube? [duplicate]

I want to export the numerical solution of the Chan-Lee oscillator as an STL file so that I could print it out. But when I expanded the curve into a tube, ...
8
votes
1answer
444 views

How to use Undocumented Functions Prism, Tetrahedron and Hexahedron

Taking a look at this question and this one, I checked to see if Mathematica really does not have a Prism primitive. To my surprise the function ...