1
$\begingroup$

When I compute the Region Bounds of a simple Pyramid, like:

view = Pyramid[{{0., 0., 0.}, {2., 0., 0.}, {2., 1., 0.}, {0., 1., 0.}, {0.5, 0.5, -1.}}];
Graphics3D[view, Axes -> True]
RegionBounds[view]

Everything works as expected:

Pyramid[{{0., 0., 0.}, {2., 0., 0.}, {2., 1., 0.}, {0., 1., 0.}, {0.5, 0.5, -1.}}]

enter image description here

{{0., 2.}, {0., 1.}, {-1., 0.}}

But if I come up with the following pyramid, RegionBounds sends an error message despite the pyramid being correctly specified...

pyr = Pyramid[{{-2.5, 106., -2.025}, {-2.5, 106., 2.025}, {-1.75, 106., 2.025}, {-1.75, 106., -2.025}, {0., 0., 0.}}]

Graphics3D[pyr, Axes -> True]

RegionBounds[pyr]

This produces the return:

Pyramid[{{-2.5, 106., -2.025}, {-2.5, 106., 2.025}, {-1.75, 106., 2.025}, {-1.75, 106., -2.025}, {0., 0., 0.}}]

enter image description here

RegionBounds::reg: Pyramid[{{-2.5,106.,-2.025},{-2.5,106.,2.025},{-1.75,106.,2.025},{-1.75,106.,-2.025},{0.,0.,0.}}] is not a correctly specified region.

But if it's not correctly specified how can I plot it and how does Pyramid[] not show any message?

Add:

I'm running this on version 11.3 student edition on a win10 64bit

$\endgroup$
7
  • 1
    $\begingroup$ Works on 11.3 Mac OS {{-2.5, 0.}, {0., 106.}, {-2.025, 2.025}} $\endgroup$ Commented Feb 4, 2019 at 17:43
  • $\begingroup$ Works in version 11.3 on Windows 10 both 32 bit and 64 bit. $\endgroup$ Commented Feb 4, 2019 at 20:12
  • $\begingroup$ Sorry, I had a typo in the question, the third point of the pyramid should be: {-1.75, 106., 2.025} instead of {-1.75, 106., .025}. The latter also works for me, but not the former. $\endgroup$ Commented Feb 4, 2019 at 22:13
  • $\begingroup$ @user64494 Could you run again the code and see if the bug pops up? Thx $\endgroup$ Commented Feb 5, 2019 at 15:41
  • 1
    $\begingroup$ Rationalze helps: pyr = Pyramid[ Rationalize[{{-2.5, 106., -2.025}, {-2.5, 106., 2.025}, {-1.75, 106., 2.025}, {-1.75, 106., -2.025}, {0., 0., 0.`}}]] $\endgroup$ Commented Feb 5, 2019 at 20:10

1 Answer 1

2
$\begingroup$

I´ve reached out to Wolfram Technical Support and their answer suggests that this is indeed a bug.

Thank you for taking the time to send this report about RegionBounds. I have been able to reproduce the issue mentioned and, therefore, I have made the proper report to our development team so it can be solved for future versions of Mathematica.

In the meantime, as @user64494 pointed out, using Rationalize seems to solve the issue:

Pyramid[ Rationalize[{{-2.5, 106., -2.025}, {-2.5, 106., 2.025}, {-1.75, 106., 2.025}, {-1.75, 106., -2.025}, {0., 0., 0.`}}]]
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.