Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 Re: Help Me ! » Cube-Sphere Packing » 2011-01-18 07:50:57

Howdy 4dLiVing!

Thank you much for this contribution to the solution of my problem! I'm going to try this method here momentarily as it seems like good way to try things. It will take me awhile to code everything up to see if things will work out how I need them to. My prior attempts used a much different process atleast code wise hence it will take some time. 

In the time since I last posted I got frustrated with the math and decided to do it the brute force way( let the computer try a lot of combinations instead of doing the math for the optimal solution).  The result was this:

See Uploaded Image*

Sorry if the image is rather low quality... scrot is messing up capturing the screen in the opengl window(no idea why).
I accomplished this rendering by following this general method:  Do everything in spherical coordinates( I don't know why I didn't think of that awhile ago!). Then by just incrementing theta's and phi's for each ring of cubes and checking for collisions, I get the shown rendering.  The gaps in each ring is caused by there not being enough room for another cube in said ring of cubes. The only way to fix this I can think of is just spacing out that gap equally across the ring... but thats not really what I want in the end.

This method of brute forceing... may or may not work efficiency wise. I'm definitely going to work out 4dLiVing's suggestions to see if I can get that way to work because of efficiency. With this brute force method this particular rendering is with a distance of r=50 from the origin of the sphere and it's only half of the sphere and only the layer of cubes at r=50.  It took approx  10 seconds to run everything... which isn't terrible. But when im eventually going to want to be calculating the cubes for r=0 to r=1000.... computational time might become an issue.

#2 Re: Help Me ! » Cube-Sphere Packing » 2011-01-14 15:09:27

I can't find anything similar to it either. 400 and 500 cubes for a sphere of what radius or how many layers of unit cubes?  I would think there would be some way with a geometric series or some other series to model how many cubes there would be effeciently packed per any Nth sum.  I'm going to try manually creating layers in something like Google Sketchup and try to create a series off of that, but I would think there would be some way to just work it out on paper with unit cubes and geometry.

When I logged in the other day it showed my last visit as being in 2006! I know I had an account before then when I was actually actively participating in this wonderful forum but yeesh that was ages ago.

#3 Help Me ! » Cube-Sphere Packing » 2011-01-13 16:22:52

abhor_ennui
Replies: 5

I've got a program im coding up and I can't come up with the math behind what I need it to do nor can I find anything similar that helps.

What im trying to create is a sphere comprised of cubes.
This picture shows what im trying to get very well:   http://techboard.nemetschek.net/ubbthreads.php?ubb=download&Number=4381&filename=Sphereofcubes_Iso.jpg
The picture only shows one layer of cubes to form a sphere however.  What I'm going for is multiple layers.  So the problem im having is coming up with some formula to calculate the optimal packing of cubes( how many cubes per a layer assuming the cubes are just 1x1x1) to form a layer of a sphere for any nth layer or radius of sphere. I can find the math on other kinds of packing, this specific problem I can't seem to find anything similar to it on the interwebs. Other then that im not sure how to approach making a formula for this. Any help or shove in the right direction would be much appreciated.

Board footer

Powered by FluxBB