RegionEqual

RegionEqual[reg1,reg2]

returns True if the regions reg1 and reg2 are equal.

RegionEqual[reg1,reg2,reg3,]

returns True if the regions reg1, reg2, reg3, are all equal.

Details and Options

  • The regions reg1 and reg2 are equal if all points in reg1 are points in reg2 and vice versa.
  • If all regi are parameter-free regions, i.e. ConstantRegionQ[regi] is True, the regions are point sets, and typically True or False is returned.
  • If some regi depend on parameters, i.e. ConstantRegionQ[regi] is False, then regi represents a family of regions, and RegionEqual will attempt to compute conditions on parameters such that the regions are equal.
  • The following options can be given:
  • Assumptions $Assumptionsassumptions to make about parameters
    GenerateConditions Falsewhether to generate conditions on parameters

Examples

open allclose all

Basic Examples  (2)

Test whether two regions are equal:

Generate conditions for which two regions are equal:

Scope  (16)

Basic Uses  (4)

Test for equality:

Show two regions are not equal:

Find conditions that make regions equal:

Compare three regions at once:

Basic Regions  (4)

Regions in including Line and Interval:

Point:

Ball:

InfiniteLine:

Regions in including Point:

Line:

Polygon:

Disk, Ball and Ellipsoid:

Rectangle and RegularPolygon:

Regions in including Point:

Line:

Polygon:

Cuboid and Hexahedron:

Ball and Ellipsoid:

Tetrahedron and Simplex:

Regions in including Cuboid and Parallelepiped in :

Ellipsoid and Ball in :

Formula Regions  (4)

Implicit regions:

Parametric regions:

Compare two formula regions:

Nonconstant formula regions:

Mesh Regions  (3)

Compare MeshRegion in :

In :

In :

Compare BoundaryMeshRegion in :

In :

In :

Compare MeshRegion with BoundaryMeshRegion in :

In :

Derived Regions  (1)

Compare BooleanRegion:

Options  (2)

Assumptions  (1)

Find all radii that describe the unit circle:

Find only the positive radii:

GenerateConditions  (1)

Find when the unit disk is equal to an implicitly described annulus:

Show the conditions for which the result is valid:

Explicitly allow for degenerate cases:

Applications  (6)

Find when two lamina are equal:

Create the unit disk by covering the hole of an annulus with a disk. Find all possible radii:

Show an instance of this:

Create the unit disk by covering the hole of an annulus with a square. Find all possible side lengths:

Show an instance of this:

Find all ways to express the unit rectangle in terms of Parallelogram:

Verify the results:

Express an implicitly defined ellipse through Ellipsoid:

Find a value for each parameter:

Visualize both representations:

Demonstrate De Morgan's law, :

Properties & Relations  (4)

Equivalent regions have all points in common:

RegionEqual can be expressed with RegionWithin:

For nonempty regions, RegionDisjoint returns False when RegionEqual returns True:

Use FindInstance to find points that lie in one region but not the other:

Use RandomPoint to find a uniform sampling of points that lie in one region but not the other:

Use Reduce to find where two regions differ:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_regionequal, author="Wolfram Research", title="{RegionEqual}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/RegionEqual.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_regionequal, organization={Wolfram Research}, title={RegionEqual}, year={2017}, url={https://reference.wolfram.com/language/ref/RegionEqual.html}, note=[Accessed: 21-December-2024 ]}