1
$\begingroup$

I have two polygons that are very similar as:

poly1 =
 Polygon[{{1, 19/1650}, {2, 19/1650}, {3, 19/1650}, {4, 19/1650}, {5,   19/1650}, {6, 19/1650}, {7, 19/1650}, {8, 19/1650}, {9, 19/ 1650}, {10, 19/1650}, {11, 19/1650}, {12, 17/1650}, {13, 17/   1650}, {14, 17/1650}, {15, 17/1650}, {16, 17/1650}, {17, 17/   1650}, {18, 17/1650}, {19, 17/1650}, {20, 17/1650}, {21, 17/   1650}, {22, 17/1650}, {23, 17/1650}, {24, 17/1650}, {25, 17/   1650}, {26, 17/1650}, {27, 1/110}, {28, 1/110}, {29, 1/110}, {30,    1/110}, {31, 1/110}, {32, 1/110}, {33, 1/110}, {34, 13/1650}, {35,    13/1650}, {36, 13/1650}, {37, 13/1650}, {38, 13/1650}, {39, 1/   150}, {40, 1/150}, {41, 1/150}, {42, 1/150}, {43, 3/550}, {44, 3/   550}, {45, 3/550}, {46, 7/1650}, {47, 7/1650}, {48, 1/330}, {49, 1/   330}, {50, 1/   550}, {50, -(1/1650)}, {49, -(1/550)}, {48, -(1/330)}, {47, -(1/    330)}, {46, -(1/330)}, {45, -(7/1650)}, {44, -(7/1650)}, {43, -(7/    1650)}, {42, -(3/550)}, {41, -(3/550)}, {40, -(3/550)}, {39, -(1/    150)}, {38, -(1/150)}, {37, -(1/150)}, {36, -(1/150)}, {35, -(1/    150)}, {34, -(1/150)}, {33, -(13/1650)}, {32, -(13/1650)}, {31, -(    13/1650)}, {30, -(13/1650)}, {29, -(13/1650)}, {28, -(13/    1650)}, {27, -(13/1650)}, {26, -(13/1650)}, {25, -(1/    110)}, {24, -(1/110)}, {23, -(1/110)}, {22, -(1/110)}, {21, -(1/    110)}, {20, -(1/110)}, {19, -(1/110)}, {18, -(1/110)}, {17, -(1/    110)}, {16, -(1/110)}, {15, -(1/110)}, {14, -(1/110)}, {13, -(1/    110)}, {12, -(1/110)}, {11, -(1/110)}, {10, -(1/110)}, {9, -(1/    110)}, {8, -(1/110)}, {7, -(1/110)}, {6, -(1/110)}, {5, -(1/    110)}, {4, -(1/110)}, {3, -(1/110)}, {2, -(1/110)}, {1, -(1/    110)}}];

and

poly2 = 
  Polygon[{{1, 19/1650}, {2, 19/1650}, {3, 19/1650}, {4, 19/1650}, {5,    19/1650}, {6, 19/1650}, {7, 19/1650}, {8, 19/1650}, {9, 19/   1650}, {10, 19/1650}, {11, 19/1650}, {12, 19/1650}, {13, 19/   1650}, {14, 19/1650}, {15, 19/1650}, {16, 17/1650}, {17, 17/   1650}, {18, 17/1650}, {19, 17/1650}, {20, 17/1650}, {21, 17/   1650}, {22, 17/1650}, {23, 17/1650}, {24, 17/1650}, {25, 17/   1650}, {26, 17/1650}, {27, 17/1650}, {28, 1/110}, {29, 1/110}, {30,    1/110}, {31, 1/110}, {32, 1/110}, {33, 1/110}, {34, 1/110}, {35,    13/1650}, {36, 13/1650}, {37, 13/1650}, {38, 13/1650}, {39, 13/   1650}, {40, 1/150}, {41, 1/150}, {42, 1/150}, {43, 1/150}, {44, 3/   550}, {45, 3/550}, {46, 3/550}, {47, 7/1650}, {48, 7/1650}, {49, 1/   330}, {50, 1/330}, {51, 1/   550}, {51, -(1/1650)}, {50, -(1/550)}, {49, -(1/330)}, {48, -(1/    330)}, {47, -(1/330)}, {46, -(7/1650)}, {45, -(7/1650)}, {44, -(3/    550)}, {43, -(3/550)}, {42, -(3/550)}, {41, -(3/550)}, {40, -(1/    150)}, {39, -(1/150)}, {38, -(1/150)}, {37, -(1/150)}, {36, -(1/    150)}, {35, -(13/1650)}, {34, -(13/1650)}, {33, -(13/    1650)}, {32, -(13/1650)}, {31, -(13/1650)}, {30, -(13/    1650)}, {29, -(13/1650)}, {28, -(13/1650)}, {27, -(1/    110)}, {26, -(1/110)}, {25, -(1/110)}, {24, -(1/110)}, {23, -(1/    110)}, {22, -(1/110)}, {21, -(1/110)}, {20, -(1/110)}, {19, -(1/    110)}, {18, -(1/110)}, {17, -(1/110)}, {16, -(1/110)}, {15, -(1/    110)}, {14, -(1/110)}, {13, -(1/110)}, {12, -(1/110)}, {11, -(1/    110)}, {10, -(1/110)}, {9, -(1/110)}, {8, -(1/110)}, {7, -(1/    110)}, {6, -(1/110)}, {5, -(1/110)}, {4, -(1/110)}, {3, -(1/    110)}, {2, -(1/110)}, {1, -(1/110)}}]

Visually they look very similar, only that poly2 is a bit larger. But I can use poly2 to do all sort of functions. For example:

Area[poly2] == 457/550

In contrast, I cannot evaluate poly1 in any expression. Everything I evaluate returns unevaluated.

Does anybody have any ideas about why this may be happening?

$\endgroup$
2
$\begingroup$

Works for me in version 12.0:

poly1 = Polygon[{{1, 19/1650}, {2, 19/1650}, {3, 19/1650}, {4, 
 19/1650}, {5, 19/1650}, {6, 19/1650}, {7, 19/1650}, {8, 
 19/1650}, {9, 19/1650}, {10, 19/1650}, {11, 19/1650}, {12, 
 17/1650}, {13, 17/1650}, {14, 17/1650}, {15, 17/1650}, {16, 
 17/1650}, {17, 17/1650}, {18, 17/1650}, {19, 17/1650}, {20, 
 17/1650}, {21, 17/1650}, {22, 17/1650}, {23, 17/1650}, {24, 
 17/1650}, {25, 17/1650}, {26, 17/1650}, {27, 1/110}, {28, 
 1/110}, {29, 1/110}, {30, 1/110}, {31, 1/110}, {32, 1/110}, {33, 
 1/110}, {34, 13/1650}, {35, 13/1650}, {36, 13/1650}, {37, 
 13/1650}, {38, 13/1650}, {39, 1/150}, {40, 1/150}, {41, 
 1/150}, {42, 1/150}, {43, 3/550}, {44, 3/550}, {45, 3/550}, {46, 
 7/1650}, {47, 7/1650}, {48, 1/330}, {49, 1/330}, {50, 
 1/550}, {50, -(1/1650)}, {49, -(1/550)}, {48, -(1/
    330)}, {47, -(1/330)}, {46, -(1/330)}, {45, -(7/
    1650)}, {44, -(7/1650)}, {43, -(7/1650)}, {42, -(3/
    550)}, {41, -(3/550)}, {40, -(3/550)}, {39, -(1/
    150)}, {38, -(1/150)}, {37, -(1/150)}, {36, -(1/
    150)}, {35, -(1/150)}, {34, -(1/150)}, {33, -(13/
    1650)}, {32, -(13/1650)}, {31, -(13/1650)}, {30, -(13/
    1650)}, {29, -(13/1650)}, {28, -(13/1650)}, {27, -(13/
    1650)}, {26, -(13/1650)}, {25, -(1/110)}, {24, -(1/
    110)}, {23, -(1/110)}, {22, -(1/110)}, {21, -(1/
    110)}, {20, -(1/110)}, {19, -(1/110)}, {18, -(1/
    110)}, {17, -(1/110)}, {16, -(1/110)}, {15, -(1/
    110)}, {14, -(1/110)}, {13, -(1/110)}, {12, -(1/
    110)}, {11, -(1/110)}, {10, -(1/110)}, {9, -(1/110)}, {8, -(1/
    110)}, {7, -(1/110)}, {6, -(1/110)}, {5, -(1/110)}, {4, -(1/
    110)}, {3, -(1/110)}, {2, -(1/110)}, {1, -(1/110)}}];Area[poly1] Perimeter[poly1]

53/66, $ \frac{\sqrt{680626}}{55}+\frac{68494}{825}$

| improve this answer | |
$\endgroup$
  • $\begingroup$ It seems there was a problem before the update. Thank you! $\endgroup$ – NinjaCowAndForks May 23 '19 at 11:55
0
$\begingroup$

When I remove just one specific point, {12, 17/1650}. from poly1 to create a new polygon everything works as expected.

newPoly = DeleteCases[poly1, {12, 17/1650}, {2}];
Graphics[
  {{FaceForm[None], EdgeForm[Black], poly1}, {FaceForm[None], EdgeForm[Red], newPoly}},
  AspectRatio -> Full]

plot

Area[newPoly]

221/275

Perimeter[poly3]

1/825 (67669 + 14 Sqrt[680626] + Sqrt[2722501])

RegionCentroid[newPoly]

{14515/663, 1273/1640925}

I think you have created a polygon that breaks some to region mensuration functions. I also note that RegionMeasure[poly1] reports the error

RegionMeasure::nmet: Unable to compute the measure of region Polygon[{{1,19/1650},{2,19/1650},{3,19/1650},{4,19/1650},{5,19/1650},{6,19/1650},{7,19/1650},{8,19/1650},{9,19/1650},{10,19/1650},<<32>>,{43,3/550},{44,3/550},{45,3/550},{46,7/1650},{47,7/1650},{48,1/330},{49,1/330},{50,1/550},<<50>>}].

I recommend you report this problem to Wolfram Research tech support.

| improve this answer | |
$\endgroup$
  • $\begingroup$ But how would you know which point to remove so that it works? $\endgroup$ – NinjaCowAndForks May 23 '19 at 11:42
  • $\begingroup$ @NinjaCowAndForks. I coded a binary search. $\endgroup$ – m_goldberg May 23 '19 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.