Given a cube composed of cubes, with dimension s,
derive a generic algorithm to create connections between all adjacent cubes, but not diagonally.
Connections must be made only once; after cube0 is connected to cube1 don't connect 1-0
You may reference cubes only by their indices, which are derived with 3 nested for loops:
Visually, with s=3;
This is the problem I'm working on right now. I could go through and manually create all the connections, but I'd like to try scaling up to a much more complex cube shell.
I've always had a keen interest in voxels, and potential uses for them in terms of gameplay. Definitely kyuplex will integrate some 'fake' voxel like algorithms. Especially for fracturing.
No comments:
Post a Comment