# RegionMemberFunction

RegionMemberFunction[reg,]

represents a function whose values give whether a point is in a region reg or not.

# Examples

open allclose all

## Basic Examples(1)

RegionMember for a region generates a RegionMemberFunction:

Apply function repeatedly for member tests:

## Scope(16)

### Special Regions(5)

Use RegionMember to generate a RegionMemberFunction:

Apply it to a list of points to test membership:

Test for points within an Interval:

Apply it to a list of points to test membership:

Test for points within a Disk:

Apply it to a list of points to test membership:

Test for points within a Cylinder:

Apply it to a list of points to test membership:

Regions in :

### Formula Regions(3)

A union of two disks as an ImplicitRegion:

Apply it to a list of points to test membership:

A union of two cylinders as an ImplicitRegion:

Apply it to a list of points to test membership:

A disk represented as a ParametricRegion:

Apply it to a list of points to test membership:

### Mesh Regions(6)

MeshRegion in 1D:

Apply it to a list of points to test membership:

2D:

Apply it to a list of points to test membership:

3D:

Apply it to a list of points to test membership:

BoundaryMeshRegion in 1D:

Apply it to a list of points to test membership:

2D:

Apply it to a list of points to test membership:

3D:

MeshCoordinates are always members of the region:

### Derived Regions(2)

RegionIntersection of two regions:

Apply it to a list of points to test membership:

Apply it to a list of points to test membership:

## Applications(3)

Generate points on a region by filtering a uniform set of points:

Get the region bounds:

Uniformly sample over the bounding box of the region:

Select member points:

Visualize member points:

Color points based on which region they belong to:

Create membership functions for each:

Generate points over a bounding box of both regions:

Visualize:

Use random points in a region to perform Monte Carlo integration:

Evaluate a function at each sample point and take their average:

Compare with the exact value:

## Possible Issues(1)

RegionMemberFunction can only be generated for ConstantRegionQ regions:

Generate the member function for a specific instance:

Wolfram Research (2014), RegionMemberFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionMemberFunction.html.

#### Text

Wolfram Research (2014), RegionMemberFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/RegionMemberFunction.html.

#### CMS

Wolfram Language. 2014. "RegionMemberFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RegionMemberFunction.html.

#### APA

Wolfram Language. (2014). RegionMemberFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RegionMemberFunction.html

#### BibTeX

@misc{reference.wolfram_2024_regionmemberfunction, author="Wolfram Research", title="{RegionMemberFunction}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/RegionMemberFunction.html}", note=[Accessed: 12-August-2024 ]}

#### BibLaTeX

@online{reference.wolfram_2024_regionmemberfunction, organization={Wolfram Research}, title={RegionMemberFunction}, year={2014}, url={https://reference.wolfram.com/language/ref/RegionMemberFunction.html}, note=[Accessed: 12-August-2024 ]}