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

3
votes
2answers
90 views

RegionPlot with LogScale

I would like to have my RegionPlot with logarithmic scale in x and y. My code looks like ...
3
votes
2answers
89 views

How to remove parts of a curve?

I have a curve that have some unwanted parts. How can I remove them ? Or how to constraint the curve to a specific region ? Here's a MWE that shows the problem : ...
-2
votes
0answers
40 views

Several RegionPlots in one big plot [closed]

I have 3 RegionPlots and want to merge them into one plot. To illustrate my point I want to summarize it in the following: I have a piece wise defined function like ...
3
votes
3answers
90 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 ...
0
votes
2answers
47 views

Simplify Expressions used to define Region

For example, RegionPlot[{x + y > 1, x - y > 1, y - x > 1, -x - y > 1}, {x, -2, 2}, {y, -2, 2}] can be somehow written as: ...
3
votes
2answers
66 views

DiscretizeRegion does not include the boundary specified in ImplicitRegion (10.1)

I am trying to do some 3D PDE solving, and I keep running into problems with boundary conditions because my meshed boundaries are not what I expected. For example, the following code ...
6
votes
1answer
62 views

DiscretizeRegion fails for a triangular region

I define an implicit region like R = ImplicitRegion[ 0 < Sin[u]/Cos[v] < 1 && 0 < Sin[v]/Cos[u] < 1, {{u, 0, 2}, {v, 0, 2}}] But when I ...
8
votes
2answers
132 views

How to improve accuracy of NIntegrate over ImplicitRegion

I'm trying to compute the area of a implicit region given as ...
3
votes
1answer
53 views

Confused about the behavior of the properties of Regions

Actually we can get some information in here.But I'm confuse this phenomenon still: test = ConvexHullMesh[RandomReal[1, {7, 2}]] ...
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: ...
1
vote
0answers
25 views

Problem with unbounded implicit region over integers

I have a region specified implicitly, and want to find the region bounds, however there are some problems when the region is defined over the integers and it is an unbounded region. This unbounded ...
5
votes
2answers
112 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 ...
0
votes
0answers
34 views

Can I convert a 2D Region embedded in 3D into a 3D region, filling in the shell? [duplicate]

Here's a simple example, where there are built-in functions to describe both objects. {shell, ball} = DiscretizeGraphics /@ {Sphere[], Ball[]} The first of ...
11
votes
0answers
75 views

What is a robust way to determine if two polygons overlap? Possible bug in RegionIntersection or Area

When trying to determine if two polygon objects overlap, I think the intuitive way to do this would be to use the RegionIntersection function to find the ...
3
votes
1answer
71 views

How to color the exterior of a region in a `RegionPlot`?

One can color the interior of a region by ColorFunction. But how to color the exterior of a region of a RegionPlot (I want to ...
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 ...
7
votes
0answers
91 views

Is this a bug in DiscretizeRegion in 10.4?

Bug introduced in 10.4 and persists through 10.4.1 Consider the following implicit region: ...
7
votes
0answers
78 views

Defining a MeshRegion from a list of points and Polygons with duplicate points does not work in 10.4

Bug introduced in 10.4 and persists through 10.4.1 This code produces a MeshRegion in versions 10.0 through 10.3.1, ...
7
votes
1answer
129 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 ...
2
votes
1answer
82 views

How to do a ParametricPlot within a subregion

I currently have the following parametric plot. ParametricPlot[{(b - a) x/b + a x/r, (b - a) y/b + a y/r} /. {a -> 2, b -> 3}, {x, -4, 4}, {y, -4, 4}] ...
2
votes
1answer
57 views

Partition a line around intersections

I've got a bunch of lines (ideally in a single Region) as well as a single new line, e.g.: ...
2
votes
2answers
108 views

Generating periodic structure using RegionPlot3D

I am trying to create a periodic structure from a unit cell figure which I created using RegionPlot3D: ...
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 ...
1
vote
1answer
116 views

Low resolution with RegionPlot3D [duplicate]

To draw a cuboid with RegionPlot3D I can simply specify a function: ...
7
votes
0answers
80 views

RegionIntersection: Point or Line?

This may be a minor point, but I'm wondering why RegionIntersectionof the two rectangles below gives 3 Lines rather than 2 Lines and 1 Point. ...
1
vote
0answers
48 views

Handling Self-Intersecting Regions

I am trying to test various parametric regions of a function for membership of the origin (point {0,0}). I generate the boundary by creating four parametric boundary curves, and then use RegionMember ...
3
votes
1answer
76 views

RegionPlot not plotting BoundaryRegion

This question is related to RegionPlot not plotting some regions. I have the following region and want to plot the area and the boundary. In Mathematica 10.3.1 it works fine but not in 10.4. ...
11
votes
1answer
130 views

How to make a two letter monogram in 3d like the one on www.mymo.is? [duplicate]

I want to achieve the same effect like the project on http://www.mymo.is/. By taking two letters and combine them in 3d, you can get a complex shape that looks like one letter on the one side and the ...
3
votes
1answer
39 views

Getting a set of disjoint regions from the set of overlapping regions

Suppose I have two overlapping regions $R1$ and $R2$ looking like this: ...
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 ...
1
vote
1answer
154 views

Boundary Problems

I am trying to study what happens to a wave as it passes different boundaries. This is the working wave equation defined on a plane ...
0
votes
1answer
262 views

Speed up RegionPlot

I want to plot a system of equalities and inequalities. I used a combination of ImplicitRegion and RegionPlot (since RegionPlot cannot plot lines or points). But this method is very slow than using ...
2
votes
2answers
140 views

Can't find maximum of a function on a region

for h=0.2 I'm trying to find the maximum value of (-h^2/3)*(-1/x^2) subject to ...
2
votes
1answer
127 views

MeshRegion: How to take out a subregion

I have this application at hand: I need to find the Voronoi Regions of a finite set of point and then i have to find the center of mass of each of these Voronoi regions for a given mass distribution. ...
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, ...
3
votes
2answers
187 views

How can I get a smooth plot of a bounded region?

From the iterated integrals $\int_{0}^{1}\int_{\sqrt{y}}^{1}\int_{x^{3}}^{1}f(x,y),$ we have the region $$\Omega=\{0\le y\le1,\sqrt{y}\le x \le 1,x^{3}\le z \le 1\}.$$ How can I use Mathematica to ...
3
votes
1answer
98 views

Strange behavior with SliceDensityPlot3D using custom surfaces, Mesh lines have a great influence on the density plot

In this answer I was trying to make a 3D stack of disk-shaped density plots, so I was using ListSliceDensityPlot3D. I resorted to using a set of nonrectangular ...
7
votes
1answer
155 views

Alternative to the `DiscretizeRegion`?

I have a polygon: pgn = Polygon[{{0, 0}, {0, 0.018}, {0.155, 0.018}, {0.155 + 0.015, 0.008}, {0.222, 0.008}, {0.222, 0}, {0, 0}}]; here: ...
3
votes
1answer
87 views

RegionPlot with different boundaries

I would like to plot different regions, some of them with different boundaries. For instance if I use ...
6
votes
0answers
78 views

RandomPoint works with a 2D ImplicitRegion but fails for any higher dimension

This is inspired by this answer which features code that I cannot get to work at all, and I tried to figure out why. It boils down to using the function ...
5
votes
2answers
110 views

MeshRefinementFunction missing points

I'm doing some FEM on a rectangular region with a spherical cavity: ...
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: ...
1
vote
0answers
81 views

Mapping a region [closed]

Suppose I have a RegionPlot, and I want to produce a second graphic, but with a function $f$ applied to every point. For example, I could have the region in the complex plane $\{z \in \mathbb{C} \mid ...
1
vote
1answer
59 views

Exists[ ] statement inside RegionPlot[ ] too hard to resolve?

I've got a very complicated existential boolean expression, call it $\exists x: condition$, involving variables $p, q, $ and $x$. Is there a way to plot the region in which this statement holds ...
0
votes
0answers
61 views

NDSolve::bcedge error when solving PDE on a square region

I am solving a 2D PDE system: ...
5
votes
2answers
123 views
15
votes
2answers
286 views

How do I define a periodic region?

I'm trying to create a region of "thick" grid-lines, like so ...
4
votes
2answers
140 views

Confining/Periodic boundary conditions implementation for 2D Random Walker

I am new to Mathematica, and am having trouble implementing confining boundary conditions for a random walk simulation confining the walker to a pre-defined region (periodic boundary conditions would ...
6
votes
2answers
126 views

How to get the x-coordinate of a region by it's y-value

I get region like this: region = ConvexHullMesh[data = RandomReal[{0, 100}, {100, 2}]] // RegionBoundary Then I get a equally spaced y-value from minimum to ...