Message Boards Message Boards

0
|
971 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Getting the boundary of two combined objects

Hello everyone.

I have a question about getting the boundary of two combined objects. Specifically, I am faced with an error message when these objects are rotated.

In order to make the question more concrete, I'll start with an example: I define a region used by "ImplicitRegion" with two ellipsoids;

region = 
  ImplicitRegion[
   x^2/10 + y^2/20 <= 1 && x^2/20 + (y - 4)^2/10 <= 1, {x, y}];

In this case, the boundary can be easily obtained using "RegionBoundary";

RegionPlot@RegionBoundary@region

But when I start to include the rotation of the object, the error message appeared as below;

RT = RotationTransform[30. Degree]; 
rotatedboundary = GeometricTransformation[RegionBoundary@region, RT]; 
RegionPlot[rotatedboundary]

The error message for the above codes;

RegionPlot::nnregion: GeometricTransformation[RegionBoundary[ImplicitRegion[1/10 Power[<<2>>]+1/20 Power[<<2>>]<=1&&1/20 Power[<<2>>]+1/10 Power[<<2>>]<=1,{x,y}]],{{{0.866025,-0.5},{0.5,0.866025}},{0.,0.}}] cannot be automatically discretized.
RegionPlot::invplotreg: {GeometricTransformation[RegionBoundary[ImplicitRegion[Times[<<2>>]+Times[<<2>>]<=1&&Times[<<2>>]+Times[<<2>>]<=1,{x,y}]],{{{0.866025,-0.5},{0.5,0.866025}},{0.,0.}}]} is not a valid region to plot.
RegionPlot::argr: RegionPlot called with 1 argument; 3 arguments are expected.

So, I am not sure how to handle this problem.

NOTE 1: If there is only one object in the "ImplicitRegion" function, e.g.,

ImplicitRegion[x^2/10 + y^2/20 <= 1, {x,y}]; 
RT = RotationTransform[30. Degree]; 
rotatedboundary = GeometricTransformation[RegionBoundary@region, RT]; 
RegionPlot[RegionBoundary@rotatedboundary, AspectRatio -> Automatic]

Then, the result is what I expected.

Sincerely

Thanks

POSTED BY: PARK DAEHAN

Try this:

rotatedboundary = 
 GeometricTransformation[DiscretizeRegion@RegionBoundary@region, RT]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract