8
$\begingroup$

Bug introduced in 10.0.0 and persisting through 11.1.1 or later


Mathematica V10 introduced the built-in function Ball. The documentation page, Ball, says

  • Ball represents a filled ball $\{x|\left\| x-p\right\| \leq r\}$.The region is $n$ dimensional for point $p$ of length $n$.

But it doesn't look filled when I render one with Graphics3D.

Graphics3D[{Ball[3]}, PlotRange -> {{0, Automatic}, {0, Automatic}, {0, Automatic}}]

graphics

Is the documentation misrepresenting Ball or is there a bug in Graphics3D?

$\endgroup$
13
$\begingroup$

I suppose this is a minor bug. I say "minor" because I think Ball was introduced as part of the geometric region functionality that's really meant to support the FEM framework and it works well in that context. Thus, we can use it to visualize a sold ball like so:

DiscretizeRegion[Ball[], {{0, 1}, {0, 1}, {0, 1}}]

enter image description here

$\endgroup$
  • 2
    $\begingroup$ My question is about how Graphics behaves when given Ball, so I don't see this answer as relevant. $\endgroup$ – m_goldberg Oct 4 '14 at 12:24
  • 1
    $\begingroup$ @m_goldberg Well, you asked if it was a bug. I replied "this is a minor bug" with explanation as to why I consider it to be minor and suggested a workaround. $\endgroup$ – Mark McClure Oct 4 '14 at 16:03
  • $\begingroup$ It's not a work-around. A descretized region can't be combined with other graphics in a diagram rendered by Graphics3D. $\endgroup$ – m_goldberg Oct 4 '14 at 23:38
  • 1
    $\begingroup$ @m_goldberg Show[{DiscretizeRegion[Ball[],{{0,1},{0,1},{0,1}}],Graphics3D[Sphere[]]}] works fine for me. I really don't understand your object to the answer at all. Regardless, the assertion that it's not relevant seems patently false. $\endgroup$ – Mark McClure Oct 5 '14 at 0:07
3
$\begingroup$

This is a bug. I reported the problem to Wolfram tech support and I got the following confirmation:

I have filed a bug report with the development team and thank you very much for giving us feedback.

$\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.