Jump to content

  • 15 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Perfect spheres - blueprints inside Blueprints for building spheres in Minecraft

#1 User is offline

  • Group: Members
  • Posts: 51
  • Joined: 27-August 10

Posted 27 August 2010 - 06:55 PM

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.
Posted Image
(Click to enlarge. Credits to IscopeU for building this.)

This was done by using a (larger version of a) blueprint like this one:
Posted Image
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.
Posted Image
  • 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, 16 per line.
(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 2011 (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]



About the algorithm

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.

7

#2 User is offline

  • Group: Members
  • Posts: 236
  • Joined: 23-August 10

Posted 27 August 2010 - 07:16 PM

Nice! I'm sure this is useful.
Posted ImagePosted Image
0

#3 User is offline

  • Group: Members
  • Posts: 51
  • Joined: 27-August 10

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.)
0

#4 User is offline

  • Group: Members
  • Posts: 1,219
  • Joined: 23-May 10
  • 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
pymclevel: Minecraft Levels for Python
The sun rises in the -Z and sets in the +Z. Clouds travel -X.
0

#5 User is offline

  • Group: Members
  • Posts: 51
  • Joined: 27-August 10

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.
0

#6 User is offline

  • Group: Members
  • Posts: 8
  • Joined: 02-July 10

Posted 28 August 2010 - 03:42 PM

I think I love you, OP.
1

#7 User is offline

  • Group: Members
  • Posts: 16
  • Joined: 03-August 10

Posted 28 August 2010 - 03:54 PM

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

#8 User is offline

  • Group: Members
  • Posts: 51
  • Joined: 27-August 10

Posted 28 August 2010 - 05:14 PM

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

#9 User is offline

  • Group: Members
  • Posts: 155
  • Joined: 14-August 10
  • Location: STALKER!

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.
Posted Image

R4ptor said:

Haha! Damn ocean's sneaking into mines.


Smile!
0

#10 User is offline

  • Group: Members
  • Posts: 13
  • Joined: 26-August 10
  • Location: Tacoma, WA

Posted 28 August 2010 - 05:27 PM

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

#11 User is offline

  • Group: Members
  • Posts: 11
  • Joined: 08-August 10

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! :P
Posted ImagePosted ImagePosted ImagePosted ImagePosted ImagePosted ImagePosted Image
0

#12 User is offline

  • Group: Members
  • Posts: 51
  • Joined: 27-August 10

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
0

#13 User is offline

  • Group: Members
  • Posts: 1,619
  • Joined: 10-November 09
  • 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. ^^;

Cookies to you! =D

Book'd.
0

#14 User is offline

  • Group: Members
  • Posts: 180
  • Joined: 16-August 10

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.
0

#15 User is offline

  • Group: Members
  • Posts: 32
  • Joined: 30-August 10

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. ^_^
0

#16 User is offline

  • Group: Members
  • Posts: 51
  • Joined: 27-August 10

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.org/files/misc/minecr ... ameter=100
0

#17 User is offline

  • Group: Members
  • Posts: 1,120
  • Joined: 25-August 09

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.
Real Minecr--oh screw this.
Youtube
C-Booster: Instant maximum momentum, teleportation, force fields, floating minecarts
Pachelbel's Canon noteblocks, full song
0

#18 User is offline

  • Group: Members
  • Posts: 51
  • Joined: 27-August 10

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.
0

#19 User is offline

  • Group: Members
  • Posts: 32
  • Joined: 30-August 10

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.

:gravel: 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. :Zombie:
0

#20 User is offline

  • _H_
  • Iron Miner
  • Group: Members
  • Posts: 270
  • Joined: 09-August 10

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
0

Share this topic:


  • 15 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

14 User(s) are reading this topic
4 members, 10 guests, 0 anonymous users

  1. Photoloss,
  2. balloon0410,
  3. kirinuma,
  4. jamfilms