0
$\begingroup$

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

Image[Graphics[{Circle[]}]]

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.


Update:

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.

$\endgroup$
  • $\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$ – Josh Bishop Nov 14 '16 at 17:53
  • $\begingroup$ @JoshBishop 3-dimension sphere is a surface of ball but not solid $\endgroup$ – yode Nov 14 '16 at 18:26
  • $\begingroup$ is there a reason you need a solid in image form? $\endgroup$ – Josh Bishop Nov 14 '16 at 19:24
  • $\begingroup$ Can someone please write and explain the code for the above 3-sphere? $\endgroup$ – Dilaton Nov 22 '17 at 18:24
7
$\begingroup$

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

RegionImage[Sphere[]]

It is what I want exactly.

$\endgroup$
  • $\begingroup$ Those Moiré patterns are attractive, or distracting, depending on your point of view. $\endgroup$ – J. M.'s ennui Sep 16 '17 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 '17 at 19:31

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.