Automatic Region Simplification
Operations on special regions are improved in Version 11 to give the best representations in terms of special regions where possible.
Intersect the unit disk with the unit rectangle.
In[1]:=
![Click for copyable input](assets.en/automatic-region-simplification/In_39.png)
RegionIntersection[Disk[], Rectangle[]]
Out[1]=
![](assets.en/automatic-region-simplification/O_24.png)
![](assets.en/automatic-region-simplification/O_25.png)
Apply an affine transformation to a special region.
In[2]:=
![Click for copyable input](assets.en/automatic-region-simplification/In_40.png)
TransformedRegion[Disk[{1, 2}, {1, 2}],
AffineTransform[{{{1, 2}, {3, 1}}, {1, 2}}]]
Out[2]=
![](assets.en/automatic-region-simplification/O_26.png)
In[3]:=
![Click for copyable input](assets.en/automatic-region-simplification/In_41.png)
TransformedRegion[Rectangle[],
ShearingTransform[\[Pi]/4, {1, 0}, {0, 1}]]
Out[3]=
![](assets.en/automatic-region-simplification/O_27.png)
Take the product of two regions and produce a special region of higher dimension.
In[4]:=
![Click for copyable input](assets.en/automatic-region-simplification/In_42.png)
RegionProduct[Interval[{a, b}], Disk[{x, y}, r]]
Out[4]=
![](assets.en/automatic-region-simplification/O_28.png)
In[5]:=
![Click for copyable input](assets.en/automatic-region-simplification/In_43.png)
RegionProduct[Parallelepiped[{1, 1, 1}, IdentityMatrix[3]],
Rectangle[]]
Out[5]=
![](assets.en/automatic-region-simplification/O_29.png)
Compute the difference between special regions.
In[6]:=
![Click for copyable input](assets.en/automatic-region-simplification/In_44.png)
RegionDifference[Disk[{0, 0}, 2], Rectangle[{2, 2}]]
Out[6]=
![](assets.en/automatic-region-simplification/O_30.png)
In[7]:=
![Click for copyable input](assets.en/automatic-region-simplification/In_45.png)
RegionDifference[Cuboid[], Ball[{0, 0, 0}, 2]]
Out[7]=
![](assets.en/automatic-region-simplification/O_31.png)