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
777 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
947 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
209 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
502 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 ...
5
votes
2answers
145 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.: ...
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
624 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
918 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
785 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
2k 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
203 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
292 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: ...
6
votes
2answers
247 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: ...
3
votes
1answer
148 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 ...
3
votes
2answers
130 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. ...
8
votes
1answer
120 views

TransformedRegion, RegionPlot broken in 10.0.2.0?

After having had trouble applying TranslationTransform to a simple region like so ...
6
votes
1answer
134 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: ...
2
votes
3answers
119 views

Create region from polygons and tangential line segments

I have two circles and tangential line segments that I want to define a region: ...
2
votes
3answers
255 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 ...
-1
votes
1answer
110 views

How to input functions into Mathematica [closed]

I need help with this assignment like asap. I've never been taught how to use this program and our math department expects us to learn how to use it, but it is just so complicated!!! Please help me ...
22
votes
3answers
2k views

RegionPlot3D in cylindrical or spherical coordinates?

RegionPlot3D is awesome. Unfortunately, it appears to work only for Cartesian coordinates. While there are ways to draw surfaces in spherical or cylindrical coordinates, I can't find a way to draw ...
12
votes
2answers
732 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
506 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
153 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
237 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
629 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
120 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
211 views

Problem with DiscretizeRegion

Bug fixed in 10.1.0 ...
6
votes
0answers
160 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 ...
5
votes
2answers
113 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
99 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
120 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
545 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 ...
1
vote
2answers
635 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
144 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
121 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: ...
7
votes
1answer
261 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
1answer
158 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
123 views
5
votes
2answers
191 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 ...
8
votes
1answer
423 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 ...
7
votes
1answer
79 views

RandomPoint fails with a large enough number of points

Bug introduced in 10.2.0 and fixed in 10.3.1. RandomPoint is new in 10.2.0. I have defined a simple ellipsoidal parametric region: ...
7
votes
2answers
192 views

A method to discretize a three-dimensional solid

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

Strange behavior of `BoundaryMeshRegion`

BoundaryMeshRegion is new function of version 10. I am not familiar with the function. I want to decide whether a point is inside or outside in the Boundary using ...
5
votes
1answer
50 views

Is there any way to improve the result of DiscretizeRegion on this 3D ImplicitRegion?

Consider two definitions of a cubic region, ...
4
votes
2answers
267 views

Join Two Element Meshes

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

Equation of a transformed (roatted) ellipsoid

Given an ellipsoid with semi-axis {a,b,c} and cantered at {a,0,0}, how do I use ...