Message Boards Message Boards

[✓] Use RegionMember properly?

GROUPS:

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
Answer
11 days ago

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
Answer
11 days ago

Dear Sander, thank you very much :-)

POSTED BY: Andras Gilicz
Answer
11 days ago

Group Abstract Group Abstract