I was experimenting with the code from this question when I ran into another problem with regions.
Ω = RegionDifference[Rectangle[{0, 0}, {10, 10}], Rectangle[{4, 4}, {8, 8}]];
RegionPlot[Ω]
Ω1 = TransformedRegion[Ω, RotationTransform[45 °, {5, 5}]];
RegionQ[Ω1]
True
RegionPlot[Ω1]
RegionPlot::invplotreg: TransformedRegion[RegionDifference[Rectangle[{0, 0}, {10, 10}], Rectangle[{4, 4}, {8, 8}]], TransformationFunction[...]] is not a valid region to plot. >>
What is the difference between a "valid region to plot" and a region that satisfies RegionQ
? Or, perhaps, to put it better, am I seeing a bug in RegionPlot
or just an incomplete implementation?
I note that
RegionPlot[TransformedRegion[Rectangle[], RotationTransform[45 °, {.5, .5}]],
PlotRange -> All]
works as expected, so it would seem RegionPlot
can handle rotations for some class of inputs.
TransformedRegion
documentation doesn't work properly. And the second example hangs the kernel... $\endgroup$PlotRange -> All
. (+1) $\endgroup$Head
TransformedRegion
does not work as a suggestion for improvement. $\endgroup$TransformedRegion[Rectangle[], RotationTransform[45 °, {.5, .5}]]
has headTransformedRegion
, but can be plotted byRegionPlot
. $\endgroup$