Find bounding box of arbitrary 3d graphics?
Clash Royale CLAN TAG#URR8PPP
$begingroup$
What's the best workaround for this limitation:
RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[Cone, Cuboid]]]
graphics3d geometry
$endgroup$
add a comment |
$begingroup$
What's the best workaround for this limitation:
RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[Cone, Cuboid]]]
graphics3d geometry
$endgroup$
1
$begingroup$
Tz. Who downvotes this? @M.R. What aboutRegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?
$endgroup$
– Henrik Schumacher
Jan 14 at 15:50
$begingroup$
The very last item in theDiscretizeRegion
docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
$endgroup$
– Carl Lange
Jan 14 at 15:56
1
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
Jan 14 at 15:57
$begingroup$
@HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
$endgroup$
– Kuba♦
Jan 14 at 15:58
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
Jan 14 at 16:33
add a comment |
$begingroup$
What's the best workaround for this limitation:
RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[Cone, Cuboid]]]
graphics3d geometry
$endgroup$
What's the best workaround for this limitation:
RegionBounds[
BoundaryDiscretizeGraphics[Graphics3D[Cone, Cuboid]]]
graphics3d geometry
graphics3d geometry
edited Jan 14 at 16:16
Carl Lange
3,5951731
3,5951731
asked Jan 14 at 15:28
M.R.M.R.
15.2k555186
15.2k555186
1
$begingroup$
Tz. Who downvotes this? @M.R. What aboutRegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?
$endgroup$
– Henrik Schumacher
Jan 14 at 15:50
$begingroup$
The very last item in theDiscretizeRegion
docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
$endgroup$
– Carl Lange
Jan 14 at 15:56
1
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
Jan 14 at 15:57
$begingroup$
@HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
$endgroup$
– Kuba♦
Jan 14 at 15:58
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
Jan 14 at 16:33
add a comment |
1
$begingroup$
Tz. Who downvotes this? @M.R. What aboutRegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?
$endgroup$
– Henrik Schumacher
Jan 14 at 15:50
$begingroup$
The very last item in theDiscretizeRegion
docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)
$endgroup$
– Carl Lange
Jan 14 at 15:56
1
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
Jan 14 at 15:57
$begingroup$
@HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
$endgroup$
– Kuba♦
Jan 14 at 15:58
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
Jan 14 at 16:33
1
1
$begingroup$
Tz. Who downvotes this? @M.R. What about
RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?$endgroup$
– Henrik Schumacher
Jan 14 at 15:50
$begingroup$
Tz. Who downvotes this? @M.R. What about
RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?$endgroup$
– Henrik Schumacher
Jan 14 at 15:50
$begingroup$
The very last item in the
DiscretizeRegion
docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)$endgroup$
– Carl Lange
Jan 14 at 15:56
$begingroup$
The very last item in the
DiscretizeRegion
docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)$endgroup$
– Carl Lange
Jan 14 at 15:56
1
1
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
Jan 14 at 15:57
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
Jan 14 at 15:57
$begingroup$
@HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
$endgroup$
– Kuba♦
Jan 14 at 15:58
$begingroup$
@HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
$endgroup$
– Kuba♦
Jan 14 at 15:58
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
Jan 14 at 16:33
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
Jan 14 at 16:33
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid], PlotRangePadding -> None]]
(* -1., 1., -1., 1., -1., 1. *)
See How to get the real PlotRange using AbsoluteOptions?
If "arbitrary 3d graphics" includes of objects of heterogeneous dimensions, then get3DPlotRange
still works:
Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid, Point[0, 0, -3],
Line[1, 0, 0, -2, 0, 0]], PlotRangePadding -> None]]
(* -2., 1., -1., 1., -3., 1. *)
$endgroup$
add a comment |
$begingroup$
RegionBounds@RegionUnion[
BoundaryDiscretizeRegion[Cone],
BoundaryDiscretizeRegion[Cuboid]
]
-1., 1., -1., 1., -1., 1.
$endgroup$
add a comment |
$begingroup$
MinMax /@ Transpose[RegionBounds /@ Cone, Cuboid]
-1, 1, -1, 1, -1, 1
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f189470%2ffind-bounding-box-of-arbitrary-3d-graphics%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid], PlotRangePadding -> None]]
(* -1., 1., -1., 1., -1., 1. *)
See How to get the real PlotRange using AbsoluteOptions?
If "arbitrary 3d graphics" includes of objects of heterogeneous dimensions, then get3DPlotRange
still works:
Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid, Point[0, 0, -3],
Line[1, 0, 0, -2, 0, 0]], PlotRangePadding -> None]]
(* -2., 1., -1., 1., -3., 1. *)
$endgroup$
add a comment |
$begingroup$
Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid], PlotRangePadding -> None]]
(* -1., 1., -1., 1., -1., 1. *)
See How to get the real PlotRange using AbsoluteOptions?
If "arbitrary 3d graphics" includes of objects of heterogeneous dimensions, then get3DPlotRange
still works:
Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid, Point[0, 0, -3],
Line[1, 0, 0, -2, 0, 0]], PlotRangePadding -> None]]
(* -2., 1., -1., 1., -3., 1. *)
$endgroup$
add a comment |
$begingroup$
Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid], PlotRangePadding -> None]]
(* -1., 1., -1., 1., -1., 1. *)
See How to get the real PlotRange using AbsoluteOptions?
If "arbitrary 3d graphics" includes of objects of heterogeneous dimensions, then get3DPlotRange
still works:
Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid, Point[0, 0, -3],
Line[1, 0, 0, -2, 0, 0]], PlotRangePadding -> None]]
(* -2., 1., -1., 1., -3., 1. *)
$endgroup$
Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid], PlotRangePadding -> None]]
(* -1., 1., -1., 1., -1., 1. *)
See How to get the real PlotRange using AbsoluteOptions?
If "arbitrary 3d graphics" includes of objects of heterogeneous dimensions, then get3DPlotRange
still works:
Charting`get3DPlotRange[
Show[Graphics3D[Cone, Cuboid, Point[0, 0, -3],
Line[1, 0, 0, -2, 0, 0]], PlotRangePadding -> None]]
(* -2., 1., -1., 1., -3., 1. *)
edited Jan 14 at 16:44
answered Jan 14 at 16:32
Michael E2Michael E2
146k12197469
146k12197469
add a comment |
add a comment |
$begingroup$
RegionBounds@RegionUnion[
BoundaryDiscretizeRegion[Cone],
BoundaryDiscretizeRegion[Cuboid]
]
-1., 1., -1., 1., -1., 1.
$endgroup$
add a comment |
$begingroup$
RegionBounds@RegionUnion[
BoundaryDiscretizeRegion[Cone],
BoundaryDiscretizeRegion[Cuboid]
]
-1., 1., -1., 1., -1., 1.
$endgroup$
add a comment |
$begingroup$
RegionBounds@RegionUnion[
BoundaryDiscretizeRegion[Cone],
BoundaryDiscretizeRegion[Cuboid]
]
-1., 1., -1., 1., -1., 1.
$endgroup$
RegionBounds@RegionUnion[
BoundaryDiscretizeRegion[Cone],
BoundaryDiscretizeRegion[Cuboid]
]
-1., 1., -1., 1., -1., 1.
answered Jan 14 at 15:56
Henrik SchumacherHenrik Schumacher
51.6k469146
51.6k469146
add a comment |
add a comment |
$begingroup$
MinMax /@ Transpose[RegionBounds /@ Cone, Cuboid]
-1, 1, -1, 1, -1, 1
$endgroup$
add a comment |
$begingroup$
MinMax /@ Transpose[RegionBounds /@ Cone, Cuboid]
-1, 1, -1, 1, -1, 1
$endgroup$
add a comment |
$begingroup$
MinMax /@ Transpose[RegionBounds /@ Cone, Cuboid]
-1, 1, -1, 1, -1, 1
$endgroup$
MinMax /@ Transpose[RegionBounds /@ Cone, Cuboid]
-1, 1, -1, 1, -1, 1
answered Jan 14 at 16:29
halmirhalmir
10.2k2443
10.2k2443
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f189470%2ffind-bounding-box-of-arbitrary-3d-graphics%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
Tz. Who downvotes this? @M.R. What about
RegionBounds@RegionUnion[ BoundaryDiscretizeRegion[Cone], BoundaryDiscretizeRegion[Cuboid] ]
?$endgroup$
– Henrik Schumacher
Jan 14 at 15:50
$begingroup$
The very last item in the
DiscretizeRegion
docs says "DiscretizeGraphics for Graphics3D with multiple volume primitives is not supported", unfortunately. Hence the need for a workaround I suppose :)$endgroup$
– Carl Lange
Jan 14 at 15:56
1
$begingroup$
@HenrikSchumacher I expect the downvote was due to the question originally not having copy-pasteable code :)
$endgroup$
– Carl Lange
Jan 14 at 15:57
$begingroup$
@HenrikSchumacher I did. Because of the very low quality question for a long term user. No copyable code, not a word about what qualifies as expected output etc.
$endgroup$
– Kuba♦
Jan 14 at 15:58
$begingroup$
Possible duplicate: mathematica.stackexchange.com/questions/18034/…
$endgroup$
– Michael E2
Jan 14 at 16:33