Skip to main content
2 of 4
Routine clean-up
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

Discretize a Graphics3D object over a given 3D lattice

Is there a way to discretize a Graphics3D object using a regular lattice with a given lattice spacing. For example:

Graphics3D[Sphere[3], PlotRange -> {{-5, 5}, {-5, 5}, {-5, 5}}]

I'd like 1s for lattice points lying in the sphere region and 0s for everything outside. For a lattice spacing of 1, I would expect 111111 points.