• Curse Sites
Help
Latest News Article

# Perfect spheres - blueprints inside

406 replies to this topic

### #1

Quchen

Stone Miner

• Members
• 88 posts

Posted 27 August 2010 - 06:55 PM

POPULAR

Introduction

I found that stacking circles with alternating radii wasn't accurate enough for me, especially for large spheres. That's why I've written a script to generate mathematically perfect spheres.

(Click to enlarge. Credits to IscopeU for building this.)

This was done by using a (larger version of a) blueprint like this one:

If you don't see how it's done right away, there's a description below.

Features
• No redundant voxels. The blueprints presented here have the minimum amount of blocks, you cannot remove any of the voxels without creating a hole in the sphere.
• Cubic symmetry, that is, the spheres are perfectly symmmetric with respect to the cubic nature of Minecraft. They look exactly the same if you look at them from the top, left, front etc.

Blueprints

How to use them

Here's an example of one of the blueprints. For the sake of simplicity I've chosen the one with diameter 3. Don't worry, for bigger spheres the images are clearer.

• Open the blueprint in some graphics program. Even MSPaint should be enough. Zoom in so you can easily see the different pixels.
• Look at the first image, i.e. the one on the very left. Build this pattern on the ground in front of you; one black pixel corresponds to one block in Minecraft. In the end, you've got some roughly circle-shaped object lying flat on the ground to your feet. In the diameter 3 case, that's some kind of a plus-shaped object.
• It's time for the second layer. Your first layer was on the ground level, the second layer is on the level above ground level. Build the second layer "in the air" above your first layer. You've now got a plus, and a donut of blocks above it.
• Build the third layer according to the blueprint ontop of your donut (layer 2).
• Done! That's your diameter 3 sphere. It looks a bit edgy, but that's the limitation of the voxels. The larger the spheres are, the rounder they look.
You may of course start building in the middle. Because of the cubic symmetry of the spheres, you may use the first image as the layer on the right and build from right to left (however I doubt that's very convenient to do).

The blueprints

Here they are, ordered by diameter.
(Red numbers indicate the middle layer(s).)

If the connection times out, it is a temporary error. The server will be running at least until october 2012 (but most probably longer). Anyway, I've packed all images and uploaded them here in case you can't wait.
[001] [002] [003] [004] [005] [006] [007] [008] [009] [010] [011] [012] [013] [014] [015] [016] [017] [018] [019] [020] [021] [022] [023] [024] [025] [026] [027] [028] [029] [030] [031] [032] [033] [034] [035] [036] [037] [038] [039] [040] [041] [042] [043] [044] [045] [046] [047] [048] [049] [050] [051] [052] [053] [054] [055] [056] [057] [058] [059] [060] [061] [062] [063] [064] [065] [066] [067] [068] [069] [070] [071] [072] [073] [074] [075] [076] [077] [078] [079] [080] [081] [082] [083] [084] [085] [086] [087] [088] [089] [090] [091] [092] [093] [094] [095] [096] [097] [098] [099] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128]

[140]
[1024]

It's basically a really mindless straight forward procedure: Calculate sphere, convert to image. I did pay no attention to effectivity, so especially larger spheres are really messy to calculate. You can view the source code here; because I never intended to post it online it's pretty short on comments though.
A rough outline of the algorithm is as follows:
• Generate a 3D array of size Diameter^3, fill with zeros. Each entry corresponds to one voxel.
• Walk through all entries. If the entry is inside the sphere, set it to 1.
• Optional: If a hollow sphere is desired, walk though all the entries again and set all those to 0 that are not at the boundary.
• Generate image out of the array, and display the z sections next to each other.
("Why did you use PHP? It's not a very effective language." - Well it was effective enough to generate the blueprints in reasonable time. I've got a C++ version as well which is orders of magnitude faster and needs almost no memory, but it lacks the nice image generation, and I don't think anyone actually needs spheres with diameters greater than what I've posted here for real.)

Larger spheres, more complex geometries

There are some other players around who have written programs similar to mine.

### #2

thodiral

Redstone Miner

• Banned
• 680 posts

Posted 27 August 2010 - 07:16 PM

Nice! I'm sure this is useful.
The Server List: theserverlist.net

### #3

Quchen

Stone Miner

• Members
• 88 posts

Posted 28 August 2010 - 03:14 PM

50 was clearly too small, added images up to 1-64.
(128 creates a "memory limit exceeded" error, at least in the default configuration. I hope nobody needs such a sphere.)

### #4

codewarrior
• Location: Big Island

Posted 28 August 2010 - 03:36 PM

Those are just what we needed.  I might have to borrow your hollow-sphere method, too.

128 is the maximum height of an Alpha level.  Of course we need that size!  There was an earlier thread requesting a 101-diameter circle to use for an above-ground dome. The 128-sphere only occupies a 2-megavoxel cube, so I'd have another look at your memory usage if I were you.
MCEdit: Minecraft World Editor

"We will absolutely not keep in mind what external mapeditors will have to do to read data from the disk, that makes no sense whatsoever." - Grum

### #5

Quchen

Stone Miner

• Members
• 88 posts

Posted 28 August 2010 - 03:39 PM

The algorithm is kind of a steamhammer approach.
For example, I'm calculating the whole sphere by brute force. By symmetry, I could calculate only one octant, and in that octant there is a 3-symmetry, so basically - only by calculating the sphere - I do 24 times the calculations that are needed for it.
I'll have a look at the memory issue, it's probably not too hard to work around.

Edit: Diameter 128 done. >40.000 voxels, have fun building it. I'll go shopping now, posting it later.

### #6

Bruce_Campbell

Posted 28 August 2010 - 03:42 PM

I think I love you, OP.

### #7

Anemoii

Tree Puncher

• Members
• 16 posts

Posted 28 August 2010 - 03:54 PM

So, is each voxel a block? I have no idea how to read those circles.

### #8

Quchen

Stone Miner

• Members
• 88 posts

Posted 28 August 2010 - 05:14 PM

Added diameters from 65-128, I hope you're happy now.
I've also written a short guide on how to use them.

### #9

Kaliedo

Iron Miner

• Members
• 255 posts
• Location: British Columbia
• Minecraft: Kaliedo

Posted 28 August 2010 - 05:23 PM

Anemoii said:

So, is each voxel a block? I have no idea how to read those circles.
Each Pixel Is a block, And Each little image is a layer of the sphere from above.

Anyway, Thanks for posting these blueprints, i don't doubt these will be very help full!
Goodness.... I just had a thought.... Creepers are like Daleks, they can Destroy everything that you know, Ever cared for, And even the whole of Reality....
We are all doomed.

R4ptor said:

Haha! Damn ocean's sneaking into mines.

Smile!

### #10

DerangedHamster
• Location: Tacoma, WA
• Minecraft: DrgdHmstr

Posted 28 August 2010 - 05:27 PM

Brilliant. And not three days ago I was attempting to do this manually in Photoshop. Tedious much.

### #11

Nero

Tree Puncher

• Members
• 11 posts

Posted 28 August 2010 - 06:30 PM

Niice! Thanks for posting these!
The way I make domes is that I set the size of the canvas (in mspaint btw) to the size I want (ex 100*100) now I want the four longest sides of the dome to be an odd number, so I had to set the size to 99. Then after building the dome upwards I could just build it downwards to make a sphere, it probabl wouldn't be 'perfect though', so this is a lot of help methinks!

### #12

Quchen

Stone Miner

• Members
• 88 posts

Posted 28 August 2010 - 06:50 PM

I could also do this for circles if you want, there are way easier algorithms for that that cost almost no memory. That other circle image I know has redundant blocks, which is uuuugh

### #13

coolpilot
• Location: Lynden, WA
• Minecraft: coolpilot

Posted 28 August 2010 - 07:16 PM

Awesome! I've been waiting for a good Sphere Guide for quite some time. Every sphere I've tried to build ended up looking like a pyramid. ^^;

Book'd.

Sniper on The Voxel Box. Creator of the Mega Tribus.
DigiCraft, the original Mega-Project, will return soon!

### #14

SmugFrog

Zombie Killer

• Members
• 180 posts

Posted 01 September 2010 - 07:26 AM

Great!  Thanks for sharing this.  I've been wanting to create a sphere, but I've been putting it off because I didn't want to let it piss me off.  I figured it would be quite a tedious process to shape correctly.

### #15

Bonegnawer

Posted 01 September 2010 - 12:54 PM

Thank you, it will be great help in my little project. ^^
You mentioned you could easily map circles ?
Pretty please, i could use such a map,
its pretty tedious to make symmetrical circles with diameter > 150 in paint.

I will build a type of structure you choose in my project as tribute.

### #16

Quchen

Stone Miner

• Members
• 88 posts

Posted 01 September 2010 - 01:09 PM

>150? Oh wow.
Well, here's a basic midpoint algorithm script, it's usually off by one pixel diameter as the algorithm treats the diameter differently as I do. It's also messy for diameters not divisible by 4, i.e. redundant pixels appear. I could of course write the sphere algorithm in 2D, it would of course be horribly inefficient as well, but would probably create more consistent circles, but I don't think you need exactly 223 pixels diameter do you?
Here you go, just replace the 1000 in the URL by the desired diameter. Script works between 1 and 1000.
http://stupidname.or... ... ameter=100

### #17

Conundrumer
• Location: New York City
• Minecraft: Conundrumer

Posted 01 September 2010 - 01:57 PM

To be excessively technical, the correct term is "octahedral symmetry"
Which gives me an idea: Generating polyhedrons of any orientation. Probably a lot less intuitive than spheres, and not as popular since not a lot of people know about polyhedrons, but it'd be cool.
Contains Pachebel's Canon made with noteblocks, a working Rubik's cube made with pistons, and the ultimate TNT cannon.

### #18

Quchen

Stone Miner

• Members
• 88 posts

Posted 01 September 2010 - 02:01 PM

Quote

To be excessively technical, the correct term is "octahedral symmetry"
To be excessively mathematical, no.

I don't thin Minecraft's resolution allows much more complex shapes, and I can't think of anything particular that is smooth and recognizeable. Joining two spheres smoothly might work, or making an ellipsoid.

### #19

Bonegnawer

Posted 01 September 2010 - 02:09 PM

I am working on an flattened sphere (holow) , dimensions: 200 x 42.
Yeah,  may be case of "bitten more than he can chew", but
its stil much fun after a week - gater materials at day,  build at night.
So it is not impossible that i will need an 222 diameter circle one day.
Ya' know things may need rings..^^

Most problems orginate from building a symetrical circle, i can't bring
none of my programms to do it ( paint / paint.net / psp). I tried to find
something on nets, but till now my google-fu was to weak.
So thank you for the link, it will surely be usefull in the comming days.

By the way, i got a pretty easy way helping to build circles without need to look at layout every other minute.
If anyone wants a tip, will be happy to share it.

### #20

_H_

Iron Miner

• Members
• 271 posts

Posted 01 September 2010 - 02:23 PM

Nice! Great reference.

Will definitely use these in future. *thumbsup*
- Minecraft : A pixelated geology survival-horror
- Dig under your feet for thrills, excitement and lava-baths.
- Minecraft <-Anagram-> Frantic Me