({{, (RefLink[RegionIntersection, paclet:ref/RegionIntersection])[(Subscript[reg, 1]),(Subscript[reg, 2]),…]
gives the intersection of the regions (Subscript[reg, 1]), (Subscript[reg, 2]), ….}})

OpenersNotesSection(Spacer1)Details and Options

A point p belongs to (RefLink[RegionIntersection, paclet:ref/RegionIntersection])[(Subscript[reg, 1]),(Subscript[reg, 2]),…] if it belongs to all (Subscript[reg, i]).

(RefLink[RegionIntersection, paclet:ref/RegionIntersection]) takes the same options as (RefLink[Region, paclet:ref/Region]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (25)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Intersection of two disks:

ℛ=RegionIntersection[Disk[{0,0},2],Disk[{0,3},2]];

Visualize it:

Region[ℛ]

Intersection of two (RefLink[MeshRegion, paclet:ref/MeshRegion]) objects:

RegionIntersection[,]

OpenersExampleSection1(Spacer1)Scope  (13)

OpenersExampleSubsection0(Spacer1)Special Regions  (7)

For some regions, intersection is computed explicitly:

(Subscript[ℛ, 1])=Triangle[{{0,0},{2,3},{-2,3}}];
(Subscript[ℛ, 2])=Triangle[{{0,2},{2,-1},{-2,-1}}];

(Subscript[ℛ, 3])=RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]

Visualize the intersection:

Graphics[{Opacity[0.5],{Red,(Subscript[ℛ, 1])},{Green,(Subscript[ℛ, 2])},{Blue,(Subscript[ℛ, 3])}}]

An intersection of an infinite line and a ball:

(Subscript[ℛ, 1])=InfiniteLine[{{-1,-2,-3},{1,2,3}}];
(Subscript[ℛ, 2])=Ball[{0,0,0},3];

(Subscript[ℛ, 3])=RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]

Visualize the intersection:

Graphics3D[{Opacity[0.5],{Red,(Subscript[ℛ, 1])},{Green,(Subscript[ℛ, 2])},{Blue,(Subscript[ℛ, 3])}}]

An intersection of (RefLink[Line, paclet:ref/Line]) regions:

ℛ=RegionIntersection[Line[{{1},{3}}],Line[{{2},{4}}]]

Visualize it:

Region[ℛ]

An intersection of (RefLink[Polygon, paclet:ref/Polygon]) regions:

ℛ1=Polygon[{{0,0},{-1,3},{0,2},{1,3}}];
ℛ2=Polygon[{{0,5},{1,2},{0,3},{-1,2}}];

ℛ=RegionIntersection[ℛ1,ℛ2];

Visualize it:

Region[ℛ]

An intersection of two (RefLink[Disk, paclet:ref/Disk]) regions:

ℛ=RegionIntersection[Disk[{0,0},1],Disk[{0,1},1]];

Visualize it:

Region[ℛ]

An intersection of a cuboid a cone:

ℛ=RegionIntersection[Cuboid[],Cone[]];

Visualize it:

Region[ℛ]

An intersection of regions with different (RefLink[RegionDimension, paclet:ref/RegionDimension]):

ℛ=RegionIntersection[Disk[{0,0},1],Circle[{0,1},1]]

Visualize it:

Region[ℛ]

OpenersExampleSubsection1(Spacer1)Formula Regions  (2)

An intersection of (RefLink[ImplicitRegion, paclet:ref/ImplicitRegion]) objects is an (RefLink[ImplicitRegion, paclet:ref/ImplicitRegion]):

(Subscript[ℛ, 1])=ImplicitRegion[x≤1,{x}];
(Subscript[ℛ, 2])=ImplicitRegion[x≥-1,{x}];

RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]

2D:

(Subscript[ℛ, 1])=ImplicitRegion[(x^2)+(y^2)≤1,{x,y}];
(Subscript[ℛ, 2])=ImplicitRegion[(x^2)+(((y-1))^2)≤1,{x,y}];

RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]

3D:

(Subscript[ℛ, 1])=ImplicitRegion[(x^2)+(y^2)+(z^2)≤1,{x,y,z}];
(Subscript[ℛ, 2])=ImplicitRegion[(((x-1))^2)+(y^2)+(z^2)≤1,{x,y,z}];

RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]

nD:

(Subscript[ℛ, 1])=ImplicitRegion[(x^2)+(y^2)+(z^2)+(u^2)+(v^2)≤1,{x,y,z,u,v}];
(Subscript[ℛ, 2])=ImplicitRegion[(((x-1))^2)+(y^2)+(z^2)+(u^2)+(v^2)≤1,{x,y,z,u,v}];

RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]

An intersection of (RefLink[ParametricRegion, paclet:ref/ParametricRegion]) objects:

(Subscript[ℛ, 1])=ParametricRegion[{u,v},{{u,0,2},{v,0,2}}];
(Subscript[ℛ, 2])=ParametricRegion[{u+1,v+1},{{u,0,2},{v,0,2}}];

ℛ=RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])];

Visualize it:

Region[ℛ]

OpenersExampleSubsection2(Spacer1)Mesh Regions  (2)

An intersection of (RefLink[BoundaryMeshRegion, paclet:ref/BoundaryMeshRegion]) objects is a (RefLink[BoundaryMeshRegion, paclet:ref/BoundaryMeshRegion]):

RegionIntersection[,]

BoundedRegionQ[%]

2D:

RegionIntersection[,]

BoundedRegionQ[%]

3D:

RegionIntersection[,]

BoundedRegionQ[%]

An intersection of full-dimensional (RefLink[MeshRegion, paclet:ref/MeshRegion]) objects is a (RefLink[MeshRegion, paclet:ref/MeshRegion]):

RegionIntersection[,]

MeshRegionQ[%]

2D:

RegionIntersection[,]

MeshRegionQ[%]

3D:

RegionIntersection[,]

MeshRegionQ[%]

OpenersExampleSubsection3(Spacer1)Derived Regions  (2)

An intersection of (RefLink[BooleanRegion, paclet:ref/BooleanRegion]) objects:

(Subscript[ℛ, 1])= BooleanRegion[Or,{Triangle[{{0,0},{2,3},{-2,3}}],Triangle[{{0,2},{2,-1},{-2,-1}}]}];
(Subscript[ℛ, 2]) = BooleanRegion[And,{Triangle[{{0,0},{2,3},{-2,3}}],Triangle[{{0,2},{2,-1},{-2,2}}]}];

ℛ=RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])];

Visualize it:

Region[ℛ]

An intersection of (RefLink[TransformedRegion, paclet:ref/TransformedRegion]) objects:

(Subscript[ℛ, 1])=TransformedRegion[Cuboid[],RotationTransform[Pi/8,{1,0,0}]];
(Subscript[ℛ, 2])=TransformedRegion[Cuboid[],RotationTransform[Pi/8,{0,1,0}]];

ℛ=RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])];

Visualize it:

Region[ℛ]

OpenersExampleSection3(Spacer1)Applications  (3)

Intersection of regions:

{(Subscript[ℛ, 1]),(Subscript[ℛ, 2])}={,};

Multicolumn[Table[RegionIntersection[(Subscript[ℛ, 1]),TransformedRegion[(Subscript[ℛ, 2]),TranslationTransform[{0,0,t}]]],{t,0,1,0.2}],3,Appearance->"Horizontal" ]

Define a disk segment as an intersection of a disk and a half-plane:

segment=RegionIntersection[Disk[{0,0},1],HalfPlane[{{0.5,0},{0.5,1}},{1,0}]];

Show[{Region[Style[Disk[],LightRed]],Region[segment]}]

Define a new basic region diskSegment that uses the same notation as (RefLink[Disk, paclet:ref/Disk]) does for disk sectors, so that diskSegment[{x,y},r,{(Subscript[θ, 1]),(Subscript[θ, 2])}] represents the disk segment from (Subscript[θ, 1]) to (Subscript[θ, 2]). Do it by writing it as a (RefLink[RegionIntersection, paclet:ref/RegionIntersection]) of a (RefLink[Disk, paclet:ref/Disk]) and a (RefLink[HalfPlane, paclet:ref/HalfPlane]):

diskSegment[{x0_,y0_},r_,{θ1_,θ2_}]:=
Module[{ϕ1,ϕ2,ϕmid},
If[θ1<θ2,{ϕ1,ϕ2}={θ1,θ2},{ϕ1,ϕ2}={θ1,θ2+2π}];
ϕmid=(ϕ1+ϕ2)/2;
RegionIntersection[Disk[{x0,y0},r],
HalfPlane[{{x0+r Cos[ϕ1],y0+r Sin[ϕ1]},{x0+r Cos[ϕ2],y0+r Sin[ϕ2]}},{Cos[ϕmid],Sin[ϕmid]}]]
];

This evaluates an object that is (RefLink[RegionQ, paclet:ref/RegionQ]) and can be used as any other region:

ℛ=diskSegment[{0,0},1,{π/4,-π/2}]

RegionMember[ℛ,{x,y}]//FullSimplify

Visualize the disk segment together with the disk:

Show[{Region[Style[Disk[],LightRed]],Region[ℛ]}]

OpenersExampleSection4(Spacer1)Properties & Relations  (4)

A point p belongs to (RefLink[RegionIntersection, paclet:ref/RegionIntersection])[(Subscript[reg, 1]),(Subscript[reg, 2]),…] if it belongs to all (Subscript[reg, i]):

(Subscript[ℛ, 1])=Disk[{0,0},2];
(Subscript[ℛ, 2])=Disk[{0,3},2];
(Subscript[ℛ, 3])=RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])];

Use (RefLink[RegionMember, paclet:ref/RegionMember]) to test membership:

p={0,1};

RegionMember[(Subscript[ℛ, 3]), p] == RegionMember[(Subscript[ℛ, 1]),p]∧ RegionMember[(Subscript[ℛ, 2]), p]

(RefLink[RegionIntersection, paclet:ref/RegionIntersection]) is a Boolean combination (RefLink[And, paclet:ref/And]) of regions:

{(Subscript[ℛ, 1]),(Subscript[ℛ, 2])} = {,};

RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]==BooleanRegion[And,{(Subscript[ℛ, 1]),(Subscript[ℛ, 2])}]

The (RefLink[RegionMeasure, paclet:ref/RegionMeasure]) of an intersection obeys a simple formula:

(Subscript[ℛ, 1])=Disk[{0,0},1];
(Subscript[ℛ, 2])=Disk[{1,0},1];
(Subscript[ℛ, 3])=RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])];

Subtract the measure of the (RefLink[RegionUnion, paclet:ref/RegionUnion]) from the sum of the measures:

RegionMeasure[(Subscript[ℛ, 3])]==RegionMeasure[(Subscript[ℛ, 1])]+RegionMeasure[(Subscript[ℛ, 2])]-RegionMeasure[RegionUnion[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]]

The (RefLink[RegionDimension, paclet:ref/RegionDimension]) of an intersection is at most the minimum of all input dimensions:

(Subscript[ℛ, 1])=Disk[{0,0},1];
(Subscript[ℛ, 2])=Circle[{1,0},1];

RegionDimension[RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]]==Min[RegionDimension/@{(Subscript[ℛ, 1]),(Subscript[ℛ, 2])}]

It can be lower, however:

(Subscript[ℛ, 1])=Disk[{0,0},1];
(Subscript[ℛ, 2])=Circle[{2,0},1];
(Subscript[ℛ, 3])=RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])];

Show[Region[(Subscript[ℛ, 1])],Region[(Subscript[ℛ, 2])],Graphics[{Red,Point[{1,0}]}]]

These regions overlap only at a point, so the dimension of the intersection is 0:

RegionDimension[(Subscript[ℛ, 3])]

OpenersExampleSection5(Spacer1)Possible Issues  (2)

(RefLink[RegionIntersection, paclet:ref/RegionIntersection]) is defined only for regions with the same (RefLink[RegionEmbeddingDimension, paclet:ref/RegionEmbeddingDimension]):

(Subscript[ℛ, 1])=Disk[];
(Subscript[ℛ, 2])=Ball[{0,0,1},1];

RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]

Components of dimension less than the embedding dimension may be omitted:

(Subscript[ℛ, 1])=MeshRegion[{{0,0,0},{2,0,0},{2,2,0},{1,1,2}},Tetrahedron[{1,2,3,4}]];
(Subscript[ℛ, 2])=MeshRegion[{{0,0,0},{2,2,0},{0,2,0},{1,1,2}},Tetrahedron[{1,2,3,4}],PlotTheme->"Web"];

Show[{(Subscript[ℛ, 1]),(Subscript[ℛ, 2])}]

RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]

Turn on a message:

On[BooleanRegion::drc]

RegionIntersection[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]

OpenersExampleSection6(Spacer1)Neat Examples  (1)

The intersection of two spiral polygons:

RegionIntersection[,]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[RegionUnion, paclet:ref/RegionUnion])  ▪  (RefLink[RegionDifference, paclet:ref/RegionDifference])  ▪  (RefLink[RegionSymmetricDifference, paclet:ref/RegionSymmetricDifference])  ▪  (RefLink[BooleanRegion, paclet:ref/BooleanRegion])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Derived Geometric Regions, paclet:guide/DerivedRegions])}, {▪(RefLinkPlain[Polygons, paclet:guide/Polygons])}, {▪(RefLinkPlain[Polyhedra, paclet:guide/Polyhedra])}, {▪(RefLinkPlain[Geometric Computation, paclet:guide/GeometricComputation])}})}})