All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Constructing a Sphere (Posted on 2012-02-25)
I would like to construct a sphere by gluing unit cubes together. I'm only attempting to approximate the shape of a sphere as closely as is possible with unit cubes.

Before I get out the glue, how would I go about creating a spreadsheet that would show me the quantity and placement of cubes in each cross-sectional layer? (think of an MRI scan cross-section)

For input, the spreadsheet should ask for the radius of the sphere to be built, as well as which layer of that sphere should be displayed.

There may be more than one way to accomplish this. Any spreadsheet that will allow me to build a sphere by displaying each layer of a sphere for a given radius is considered valid.

Here is an example of output:

Hint: The formula for distance in 3 dimensions is:

`d=√[(x2-x1)2+(y2-y1)2+(z2-z1)2]`

Bonus question! Adjust your algorithm to display a hollow sphere (think of a ping pong ball, or a beach ball). Note: All cubes must be connected into one contiguous piece.

 No Solution Yet Submitted by Dustin Rating: 5.0000 (1 votes)

 Subject Author Date re(2): coming from behind brianjn 2012-03-02 22:28:41 re: coming from behind broll 2012-03-02 11:08:59 coming from behind brianjn 2012-03-02 06:06:33 re(2): Bonus thoughts Steve Herman 2012-02-27 09:33:08 re: Bonus thoughts Dustin 2012-02-27 04:00:18 Screenshot of a hollow sphere and history Dustin 2012-02-27 03:51:25 re: Bonus thoughts brianjn 2012-02-26 19:58:05 Bonus thoughts Steve Herman 2012-02-26 19:06:11 re(2): Excel implementation - Javascript Emulations brianjn 2012-02-26 18:41:57 re(2): Excel implementation of Specific Algorithm brianjn 2012-02-26 18:01:56 re: Excel implementation of Specific Algorithm brianjn 2012-02-26 17:56:25 re: Excel implementation of Specific Algorithm Dustin 2012-02-26 16:45:46 Excel implementation of Specific Algorithm Steve Herman 2012-02-26 12:58:08 re: More specific algorithm (spoiler) brianjn 2012-02-26 08:43:28 More specific algorithm (spoiler) Steve Herman 2012-02-26 01:24:50 One passionate solution (without bonus) Steve Herman 2012-02-26 00:55:31

 Search: Search body:
Forums (45)