Message Boards Message Boards

[?] Use RegionMember properly?

Dear Community,

I tried to explore the RegionMember function to my previous post ( constrained locator ). This function should give True, it a point is inside a region, and False otherwise. Applying it to my polygon it gives True, although the investigated point is clearly outside the region :-/ Does anybody has an explanation?

Tx in advance, Andras

Attachments:
POSTED BY: Andras Gilicz
2 Replies

Dear Sander, thank you very much :-)

POSTED BY: Andras Gilicz

The cause is the large differences in order of magnitudes in both directions, you can solve this:

pts = {

                 { 0.        ,0.                      },         (* P1 *)
                 { 0.        ,4.55*^6           },        (* P2 *)
                 { 0.073 ,4.55*^6           },        (* P3 *)
                 { 0.2     ,1.2661197*^7},        (* P4 *)
                 { 0.65  ,1.87575*^7     },        (* P5 *)
                 { 1.       ,1.87575*^7     },        (* P6 *)
                 { 1.       ,0.                       }            (* P7 *)

               };
pts = SetPrecision[pts,20];

btw, there is no need to define e.g. pts, poly etcetera using :=, = is ok.

POSTED BY: Sander Huisman
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