1
$\begingroup$

This is probably a very basic question, but I haven't been able to get it to work yet. I am trying to create a filled 3D space in the region

$\qquad 0.1 < x < 9.2,\ 0.026 < y < 28.97,\ 0 < z < 5.23$

but haven't been able to manage it yet.

Any help someone would have to offer will be greatly appreciated.

$\endgroup$
  • 2
    $\begingroup$ Have a look at Cuboid and Graphics3D. $\endgroup$ – Henrik Schumacher Aug 6 '18 at 13:07
  • $\begingroup$ Or Raster3D if you want the coloration to vary over the space. $\endgroup$ – rcollyer Aug 6 '18 at 13:11
  • $\begingroup$ This might be useful. $\endgroup$ – Sumit Aug 6 '18 at 13:28
2
$\begingroup$

Looking at the way you specifying your region, you might want an alternative to Graphics3D primitives approach (Cuboid would be the simples in your case). Specify:

reg = ImplicitRegion[.1<x<9.2 && .026<y<28.97 && 0<z<5.23, {x, y, z}]

Then use

Region[reg]

enter image description here

or alternatively

RegionPlot3D[reg, PlotPoints -> 50, Axes -> True]

enter image description here

For both functions RegionPlot3D and Region you should explore various options of visual styling. This is more complex than Graphics3D but advantage is this can go to more complex regions for which there is no Graphics3D primitives, for example:

reg = ImplicitRegion[4 <= x^2 + y^2 + z^2 <= 9, {x, y, z}];
RegionPlot3D[reg, PlotStyle -> Opacity[0.5], PlotPoints -> 50]

enter image description here

$\endgroup$
1
$\begingroup$
Graphics3D[Cuboid[{0.1, 0.026, 0}, {9.2, 28.97, 5.23}]]
$\endgroup$

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.