Questions tagged [regions]

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.

Filter by
Sorted by
Tagged with
10
votes
8answers
1k views

Checking if two line segments intersect

What is the fastest way of checking whether two line segments of the form Line[{p1,p2}] intersect at a point? I don't need to know what the point of intersection is,...
1
vote
0answers
76 views

How can I solve the 2D diffusion equation over a region that contains mobile sinks?

I am looking for guidance on how to simulate the following system in 2D. I have a region, assumed to be rectangular for simplicity. A substance is diffusing into this region from its boundary. Again ...
0
votes
2answers
98 views

How plot the domain of multivariable function? [closed]

I want to get and plot the domain of the following function with mathematica : $$Arccos(xy)$$ Any idea ?
2
votes
1answer
82 views

Define Implicit Region using Interpolating Function

Suppose I have a set of points $\{(x_1,x_2) : g(x_1,x_2) > f(x_1,x_2)\}$, how would I turn this into a mesh that acts as a region for PDE solvers, or even to use as a plotting region? I have tried ...
0
votes
1answer
73 views

RegionPlot for " < " and " <= " is the same on the boundary? [duplicate]

RegionPlot[{1 <= x < 5 && 2 < y < 5}, {x, 0.8, 5.2}, {y, 1.8, 5.2}, BoundaryStyle -> Dashed] Is there a way to use SOLID line for "less ...
1
vote
1answer
66 views

What causes RegionResize errors for maps of specific countries?

I want to resize the map of the country as below. ...
0
votes
1answer
53 views

Mysterious RegionDistanceFunction::regp message

Bug introduced in 12.3.1 or earlier [CASE:4853257] I encountered a strange problem with RegionDistanceFunction. Consider this list of points (I'm forced to use <...
0
votes
1answer
118 views

RandomPoint does not return with many region intersections

I am trying to generate random points on an n-dimensional unit sphere that satisfy a number of linear inequalities (a point $v \in \mathbb{S}^N$ has to satisfy $v \cdot x \geq v \cdot x_k$ for all $...
0
votes
0answers
114 views

Bug computing a Polygon area?

Why the following code works: ...
3
votes
2answers
99 views

Create region bounded by parametric curves

How can I define a region that is bounded by a set of parametric curves? E.g. three parametric curves - which are cubic Bezier curves - define the boundary of a shape: ...
0
votes
1answer
126 views

Mathematica crashes when plotting over region

Mathematica (12.0.0 or 12.3.0) crashes and kernel quits on my computer (Win 10) when I try the simple exercise of plotting over a region (taken from this Wolfram page): ...
1
vote
1answer
86 views

Defining a region in Mathematica

I have two functions which are eigenvalues: $$ E_+= a*x-\sqrt{(b-x^2-y^2)^2+d*(x^2+y^2)}$$ ...and... $$ E_-= a*x+\sqrt{(b-x^2-y^2)^2+d*(x^2+y^2)}. $$ How do I define a region $\left|E_{\pm}\right|<...
0
votes
1answer
99 views

NIntegrate over 2D region failed. Simple integrand. Complicated region

The integrand is simply a Gaussian curve over one of the variables PDFTheta[the_] := PDF[ NormalDistribution [0, DeltaTheta/2], the] The region of integration is ...
0
votes
1answer
84 views

How to make these lines smooth when using ContourPlot inside of a region?

Consider a region in the $(R,T)$ plane defined by the conditions $$0 < R\leq \pi,\quad |T|+R<\pi\tag{1}$$ Define $t(R,T)$ to be $$t(R,T)=\dfrac{1}{2}\left(\tan\left(\dfrac{T-R}{2}\right)+\tan\...
1
vote
0answers
38 views

Finding the shared edged between two polygons

Imagine I have two convex polygons pol1 and pol2 with a shared edge. Take, as an example, ...
0
votes
1answer
72 views

When should one use RegionFunction with ParametricPlot3D?

According to the documentation, "RegionFunction is an option for plotting functions that specifies the region to include in the plot drawn", and it can be ...
3
votes
2answers
148 views

Find intersection points between ParametricRegion and other curves

How do you instruct Mathematica to return intersection points between curves as numerical values, when using ParametricRegion to represent at least one of the ...
1
vote
2answers
94 views

How can I change the default color of the basic geometric regions in 2D?

I like to use the basic geometric regions in Mathematica, like Parallelogram[...], Rectangle[...], ...
4
votes
3answers
144 views

Select list points at region [closed]

If I have a list Table[{dj, di}, {dj, 0, 1, 0.2}, {di, 0, 1, 0.2}], how can I select only the points that satisfies $\left(2-\delta_{j}\right)-\sqrt{2\left(2-\...
0
votes
1answer
67 views

ParametricPlot3D with variable plot limits

I would like to use ParametricPlot3D in the following general way: ParametricPlot3D[\[Sigma][u,v],{u,0,2Pi},{v,-f[u],f[u]}]. ...
9
votes
1answer
203 views

DirichletCondition doesn't always work with RegionBoundary

I am trying to solve the heat equation on a circle with a square shaped hole in it. It works: ...
2
votes
2answers
166 views

Plot the intersection of random half-spaces

The code ...
1
vote
0answers
83 views

Creating a map of earth from an unknown region of the sphere

Lately I've been trying to use Mathematica to plot a map of earth. I have an analytic function from a known triangle to some part of a unit sphere, described by unknown parametrization. This function $...
2
votes
1answer
77 views

Problems plotting ImplicitRegion

I have run into some rather strange behavior regarding plotting over regions defined by ImplicitRegion. I have a condition given by ...
1
vote
0answers
59 views

List of conditions Plot [closed]

I made a table of conditions, namely conditions that define spheres. But I can't plot those in "RegionPlot3D", I would really like to know what I can do to surpass this problem. When I get ...
6
votes
2answers
334 views

Maximal circle packing inside a given square

How to pack n equal disks(radius a/2) with maximal area inside a given rectangle ? I'm trying to solve this problem using Mathematicas Region functions. Here my approach: Maximize the area of the ...
0
votes
0answers
43 views

Checking Membership of Conic Hull for Multiple Inputs

Suppose I have a given $10 \times 12$ matrix T, a $12 \times 1$ vector Subscript[\[Xi], 0], a $4 \times 12$ matrix ...
1
vote
0answers
21 views

How can I ask mathematica to fill in small marginal area in regionplot3d? [duplicate]

I am stuck at how to fill in some marginal area in my regionplot3d. Here is my code. ...
0
votes
2answers
115 views

Drawing the filled Julia set of a polynomial

Suppose I use JuliaSetPlot to draw the Julia set of a polynomial. Is there a way, assuming the set is connected, to fill in the region? My idea was to use ...
4
votes
1answer
87 views

Imaginary variables in ImplicitRegion

I am using the function ImplicitRegion[]. RegionPlot[ImplicitRegion[x^2 + y^2 == -1, {x, y}]] which gives me a circle, though in the documentation variables are ...
1
vote
0answers
31 views
1
vote
0answers
39 views

How to speedup RegionIntersection?

Consider a circle circle located at the origin of a coordinate frame and with a radius ROffAxisArb (it is parametrized by two ...
0
votes
1answer
49 views

Wrong boundary in RegionPlot after RegionUnion

I have defined three regions, Slice1, Slice2 and Slice3. ...
1
vote
1answer
60 views

How to define a polygonal region in 2D to subsequently integrate over it?

I want to integrate a function f[x,y] over a region like this. Is there any way to define the region using the vertices of the purple polygon? Then I can ...
2
votes
1answer
64 views

RegionPlot3D over non-rectangular range

I want to make a RegionPlot3D only in the range x + y + z < 1. The following works, but is slow and poor quality. ...
2
votes
1answer
53 views

Plotting fundamental domains of $\mathbb{Z}^{2}$ with additional features [closed]

I'm trying to figure out how to plot a region that looks like this: The squares don't have to be painted like that, if I could have just light green, gray, light blue and light red it would be great. ...
2
votes
0answers
58 views

RegionDifference - the command does not work as shown in the help - example

Colleagues, good morning. Unfortunately, while solving my problem, I ran into a problem that stopped my project completely. RegionDifference command does not work as shown in the help topic. All ...
4
votes
4answers
79 views

Create region/limits for NMinimize from list

NMinimize can accept a region to optimize over. I'm looking to create an expression that represents a region from a list of limits e.g. ...
2
votes
0answers
47 views

Bug of the function ConvexHullRegion [closed]

The function ConvexHullRegion give the following bug (Mathematica 12.2) ...
0
votes
1answer
84 views

How to generate randomly points that belong to the given range?

Consider some rectangle called ExperimentLocation, and a circle ParticleAzimuthalCoverage: ...
3
votes
1answer
128 views

Optimal triangle (minimal area) surrounding a disk

Using RegionWithin it's quite easy to evaluate a parametric triangle with maximal area inside the disk(constant): ...
0
votes
0answers
95 views

Why the output is not in numerical form in Mathematica 12.2?

Consider the following code: ...
2
votes
1answer
75 views

How can I create a graphic array of wedges of cylinders (slice of pie)?

I'm trying to create an array of wedges of cylinders. So far I have been able to create an array of a full cylinder as shown in the next figure: Using the next code: ...
2
votes
2answers
311 views

center of mass of a 2D square

Using Mathematica, find the center of mass of a 2D square not centered at the origin. center: (x0, y0) ...
4
votes
1answer
113 views

RegionMember Bug in 12.2?

There appears to be an issue with RegionMember in Mathematica 12.2 when it comes to simple polygons and points. ...
3
votes
2answers
176 views

How to find the MeshConnectivityGraph[] from a list of independent cell mesh regions?

I'm generating a bunch of points inside a BoundaryMeshRegion. Then I generate the Voronoi mesh of the points, and take the intersection of the Voronoi cells into ...
2
votes
0answers
41 views

Finding region, between four hyperplanes, useful for integration

Consider the function $$ f(x,y,u,v) = \exp\bigl( -x^2 -y^2 -u^2 -v^2 \bigr), $$ and the region $\mathcal{R} = \cap_{i=1}^4 \mathcal{R}_i$ defined by four hyperplanes as follows $$ \begin{align} \...
0
votes
1answer
52 views

plotting an inequality [closed]

Can anyone help in plot an inequallity Abs[[x/[1 + x]] - [y/[1 + y]]] <= Abs[x - y]/[1 + 0.01 Abs[x - y]] where 0 < x< 1 and 0 < y< 1 When I tried with Plot command as well as Plot3D ...
1
vote
0answers
39 views

RegionPlot3D incorrectly plots regions defined by memoized functions

RegionPlot3D incorrectly plots regions defined by memoized functions. A memoizer: ...
7
votes
4answers
401 views

RegionPlot3D KnotData

Is it possible to find or construct a RegionPlot out of KnotData? My motivation is to Texture...

1
2 3 4 5
19