Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.7K Views
|
3 Replies
|
1 Total Like
View groups...
Share
Share this post:

Why does RegionCentroid crash on 2D-Polygons (WL V13.1)?

Posted 3 years ago

Use the following code which is copied from the reference documentation for RegionCentroid

reg = Polygon[{{0, 0}, {1, 0}, {1.5, 0.5}, {1, 1}, {0, 1}, {-0.5, 0.5}}];
RegionCentroid[reg]

This crashes with a Beep and an unitialized kernel and nothing else. No error message.

POSTED BY: Werner Geiger
3 Replies
Posted 3 years ago
POSTED BY: Werner Geiger
Posted 3 years ago

Hi Werner,

Returns {0.5, 0.5} on "13.1.0 for Mac OS X ARM (64-bit) (June 16, 2022)". What platform are you on?

POSTED BY: Rohit Namjoshi
Posted 3 years ago

This happened with:

  • Windows 10 Pro (64-bit), 21H2, Build 19044.1949 - Wolfram|One 13.1.0
  • Intel(R) Core(TM) i7-3840QM CPU @ 2.80GHz 2.80 GHz
  • 16 GB RAM

I just tried it on:

  • Windows 11 Pro (64-bit), 21H2, Build 22000.918 - Wolfram|One 13.1.0
  • 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz 2.50 GHz
  • 64 GB RAM

There it works and returns {0.5,0.5}.

Strange! Why could such a simple calculation depend on the operating system or hardware?

POSTED BY: Werner Geiger
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard