5
$\begingroup$

I can't figure out why the following code only works with integers.

r1 = TransformedRegion[Cuboid[{-1, -1, -1}, {1, 1, 1}], TranslationTransform[{0, 1, 0}]]
RegionPlot3D[r1]
DiscretizeRegion[r1]
RegionQ[r1]

enter image description hereenter image description here

now, If I replace every "1" with a "1.", I get an error message.

r1 = TransformedRegion[Cuboid[{-1., -1., -1.}, {1., 1., 1.}], TranslationTransform[{0, 1,0}]]
RegionPlot3D[r1]
DiscretizeRegion[r1]
RegionQ[r1]

enter image description here

The problem seems to extend to most of mathematica's new region functions, as demonstrated below with RegionMeasure. A possible work around is to symbolically evaluate the expression first.

r1 = TransformedRegion[Cuboid[{-1., -1., -1.}, {1, 1, 1}],TranslationTransform[{0, 1, 0}]];
RegionMeasure[r1]

r1 = TransformedRegion[Cuboid[{-a, -a, -a}, {a, a, a}], TranslationTransform[{0, 1, 0}]];
RegionMeasure[r1] /. a -> 1.0

enter image description here enter image description here

Has anybody else experimented with this issue?

$\endgroup$

closed as off-topic by MarcoB, user9660, m_goldberg, kirma, Öskå Mar 3 '16 at 21:15

  • The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Confirmed on Windows 7. $\endgroup$ – Simon Woods Aug 10 '14 at 19:33
  • 1
    $\begingroup$ RegionPlot is known to have problems with TransformedRegion. See this question. I suspect something similar is going on with RegionPlot3D. $\endgroup$ – m_goldberg Aug 11 '14 at 3:11
  • $\begingroup$ Confirmed on OS X 10.6.8. $\endgroup$ – m_goldberg Aug 11 '14 at 3:16
  • 1
    $\begingroup$ Confirmed on Windows 8.1. You should report this to WRI. $\endgroup$ – RunnyKine Aug 11 '14 at 4:31
  • 5
    $\begingroup$ I'm voting to close this question because this has been fixed in version 10.3.1 on Win7-64: output with 1.. $\endgroup$ – MarcoB Mar 1 '16 at 5:37

Browse other questions tagged or ask your own question.