RegionMember
RegionMember[reg,{x,y,…}]
gives True if the numeric point {x,y,…} is a member of the constant region reg and False otherwise.
RegionMember[reg,{x,y,…}]
gives conditions for the point {x,y,…} to be a member of reg.
RegionMember[reg]
returns a RegionMemberFunction[…] that can be applied repeatedly to different points.
Details
- RegionMember is also known as point in region test, membership test, and membership conditions.
- A constant region is a region where ConstantRegionQ[reg] gives True.
Examples
open allclose allBasic Examples (3)
Test whether a particular point is in a region:
Get conditions for point membership:
Create RegionMemberFunction to apply to different points:
Scope (21)
Basic Uses (4)
Directly test whether a point is in a region:
Directly test whether a list of points is in a region:
Get conditions for point membership by using variables {x,y}:
Create RegionMemberFunction to apply to different points:
Special Regions (6)
Formula Regions (3)
Mesh Regions (4)
Derived Regions (4)
RegionIntersection of two regions:
Uniformly sample over the bounding box for the region:
RegionUnion of mixed-dimensional regions:
Applications (6)
Basic (2)
Convert polygon data for the given country to a MeshRegion:
Determine membership of a city:
For a parameterized region, RegionMember can give conditions on the parameters to determine when a given point is a member:
Random Points in a Region (2)
Generate points on a region by filtering a uniform set of points:
Uniformly sample over the bounding box of the region:
Convert polygon data for the given country to a MeshRegion:
Monte Carlo Integration (2)
Perform Monte Carlo integration to estimate the area of a unit disk:
Uniformly sample over the bounding box of the region:
Count the number of samples inside the region:
Get the ratio of samples inside the region to the total number of sample points:
Get the approximate area of the region:
Use random points in a region to perform Monte Carlo integration:
Evaluate a function at each sample point and take their average:
Properties & Relations (5)
Element can be used to test region membership for constant regions:
RegionDistance is 0 for a member:
SignedRegionDistance is non-positive for a member:
SignedRegionDistance is positive for a non-member:
Use RegionNearest to find the nearest member:
Use FindInstance to find multiple instances for special and formula regions:
Text
Wolfram Research (2014), RegionMember, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionMember.html.
CMS
Wolfram Language. 2014. "RegionMember." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RegionMember.html.
APA
Wolfram Language. (2014). RegionMember. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionMember.html