In 2 dimensions, I can do like this to draw my image:


But in 3 dimensions, this method will give an error information:

So I try another array method:

Image[Thinning[Unitize[EntropyFilter[ArrayPad[DiskMatrix[{10, 10}], 1], 1]]]]

This is good method in 2 dimensions. But the function Thinning cannot be used in 3 dimensions. So I don't know how to draw a 3D sphere still.


It seem the

EdgeDetect[Image3D[ArrayPad[DiskMatrix[{40, 40, 40}], 1]]]

is close to what I want.But this method is costing memory very much and the surface'sthickness seem to be not very uniform.

  • $\begingroup$ It seems that just Image3D[DiskMatrix[{100, 100, 100}]] works, but I'm curious why the interplay between Image and Graphics works, while the interplay between Image3D and Graphics3D does not.... $\endgroup$ Nov 14, 2016 at 17:53
  • $\begingroup$ @JoshBishop 3-dimension sphere is a surface of ball but not solid $\endgroup$
    – yode
    Nov 14, 2016 at 18:26
  • $\begingroup$ is there a reason you need a solid in image form? $\endgroup$ Nov 14, 2016 at 19:24
  • $\begingroup$ Can someone please write and explain the code for the above 3-sphere? $\endgroup$
    – Dilaton
    Nov 22, 2017 at 18:24

1 Answer 1


If we are in 11.2,the RegionImage can help us to implement it


It is what I want exactly.

  • $\begingroup$ Those Moiré patterns are attractive, or distracting, depending on your point of view. $\endgroup$ Sep 16, 2017 at 23:52
  • $\begingroup$ @J.M. I wonder where they come from. It'd be interesting to know if it's an issue of meshing or rendering. $\endgroup$
    – b3m2a1
    Nov 22, 2017 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.