Pixelated Sphere


I aim to make a pixelated spheric volume. like the stack of equal cubes which comprise a shape that is inbound in a sphere.

i found some help around (link below) but i cannot develop i according to my wish

any clue/help/hint would be appreciated

blocky.ghx (71.5 KB)

Do you mean the cubes need to be totally inside the sphere, instead of overlapping it? Or do you mean you want to be able to control certain sizes/dimensions?

The file you attached seems to be working on my computer.

Thank you.

Ideally none of the spheres should be overlapping.( minecraft style) To give some dimensions, lets say, 70 radius sphere, 2mx2mx3.5m cubes. Nothing else needs to be controlled.

Yes the file is working unless i change the radius of a sphere. In that case the cubes dont follow the sphere parameter.

I tried to change the range and set some domain to it but the cubes dispersed and cant go attach to each other anymore.

Have a look here:

Like Amir said, looking into voxel approaches should be helpful.

I also sketched out a quick version. It’s kind of slow but it gets it done.

voxel sphere.gh (14.0 KB)

I think the others have pretty much covered you.
I’m only posting this because it has the option to remove voxels from the center so as to be lighter for the graphics card!
(if it’s not for construction, only what you see matters)

voxelsphere.gh (19.4 KB)

Hmm … if memory serves well … long time ago … someone said something related with long (and hilly) paths. What happened? (time flies).

Get the general case and pay attention to the proportional option (a must).

Voxels_V1.gh (124.0 KB)
Voxels_V1.3dm (206.1 KB)


Get the trad update as well (3rd voxel option + a voxel size bug fixed + new elimination option (value < 1) added):

Voxels_V1A.gh (125.9 KB)

Questions for the (very) brave:

  1. Why the sphere is not pixelated “uniformly”? Where is the small bug?
  2. Can you union all the voxels? (as Breps or Meshes). If not why?
  3. Can you change the code in order to accept either Breps or Meshes?
  4. Is Lewis safe in the walk for his 5th crown? If not why?

Oh dark lord,
happy to see you in the forum again. Seems like you’ve been enjoying the Greek sun.
I’ve just started getting into coding again. :slight_smile:

Good news.

BTW: CHANGE your avatar ASAP. I would suggest that one:

If I were to chose a flying elephant, it would be this one: