RegionWithin

RegionWithin[reg1,reg2]

returns True if reg2 is contained within reg1.

Details and Options

  • The region reg2 is contained within reg1 if every point that belongs to reg2 also belongs to reg1.
  • 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 RegionWithin will attempt to compute conditions on parameters such that reg2 is contained within reg1.
  • The following options can be given:
  • Assumptions$Assumptionsassumptions to make about parameters
    GenerateConditionsFalsewhether to generate conditions on parameters

Examples

open allclose all

Basic Examples  (2)

Test whether a region is contained within another:

In[1]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Visualize them:

In[4]:=
Click for copyable input
Out[4]=

Generate conditions for which a region is contained within another:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Scope  (15)

Options  (2)

Applications  (7)

Properties & Relations  (5)

See Also

RegionEqual  RegionDisjoint  RegionMember  BoundingRegion  RegionNearest  RegionDistance  RandomPoint

Introduced in 2017
(11.1)