Message Boards Message Boards

1
|
1565 Views
|
1 Reply
|
4 Total Likes
View groups...
Share
Share this post:

Why is RegionEqual returning "false" for equal regions?

Hello, I have two different regions that I have checked by hand to see that they are indeed equal. However, RegionEqual is returning "false" for me. Can someone tell me what is happening? Details, including the by hand calculations are included below.

v1 = Simplify[{0 - 5/(74^(1/2)), 1 + 7/(74^(1/2)), 0}]
v2 = {0, 0, 1}
Lower2 = InfinitePlane[{5/(74^(1/2)), -7/(74^(1/2)), 0}, {v1, v2}]
Lower3 = InfinitePlane[{0, 1, 0}, {v1, v2}]
RegionEqual[Lower2, Lower3]

Lower2 is the plane described by the point p1 (below) with vectors v1 and v2 (above) while Lower3 is the plane described described by the point p2 (belows) with vectors v1 and v2 (above).

p1 = {5/Sqrt[74], -(7/Sqrt[74]), 0}
p2 = {0, 1, 0}

The normal vector is the same for each and it is the following:

Cross[v1, v2]

which returns:

{1 + 7/Sqrt[74], 5/Sqrt[74], 0}

Using the normal vector and the points, one can easily check by hand that these are in fact the same plane. Using the typical equation for the plane:

a(x - x1) + b(y - y1) + c(z - z1) = 0

where <a,b,c> is the normal vector and (x1, y1, z1) is a point on the plane, one can check the that p2 satisfies the equation for Lower2 and that p1 satisfies the equation for Lower3. I even graphed each region and they appear to be the same.

Show[Graphics3D[Lower2], Graphics3D[Lower3]]

Any help on this is appreciated!

POSTED BY: Dustin Gaskins

My guess is that it is either a bug or a restriction on how RegionEqual[] works with InfinitePlane[].

Here's a way to convert InfinitePlane[] to an ImplicitRegion[], on which RegionEqual[] works:

RegionEqual[
 ImplicitRegion[RegionMember[#, {x, y, z}], {x, y, z}] &@
  InfinitePlane[{5/Sqrt[74], -(7/Sqrt[74]), 0}, 
    {{-(5/Sqrt[74]), 1 + 7/Sqrt[74], 0}, {0, 0, 1}}],
 ImplicitRegion[RegionMember[#, {x, y, z}], {x, y, z}] &@
  InfinitePlane[{0, 1, 0},
    {{-(5/Sqrt[74]), 1 + 7/Sqrt[74], 0}, {0, 0, 1}}]
 ]

(*  True  *)

Note that RegionEqual fails on the simplest of equivalent InfinitePlane regions:

RegionEqual[
 InfinitePlane[{-1, 1, 0}, {{1, 0, 0}, {0, 0, 1}}],
 InfinitePlane[{0, 1, 0}, {{1, 0, 0}, {0, 0, 1}}]
 ]

(*  False  *)
POSTED BY: Michael Rogers
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