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.
[*]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.
[color=#0080FF][size=large]How to use them[/size][/color]
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).
[i][color=#0080FF][size=xx-large]About the algorithm[/size][/color][/i]
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 [url="http://stupidname.org/files/misc/minecraft/voxelspheres/voxelspheres_source.txt"]view the source code here[/url]; because I never intended to post it online it's pretty short on comments though.
A rough outline of the algorithm is as follows:[numlist]
[*]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.)
[i][color=#0080FF][size=xx-large]Larger spheres, more complex geometries[/size][/color][/i]
There are some other players around who have written programs similar to mine.[list]
[*]The executable available at [url="http://perfectsphere.codeplex.com/"]http://perfectsphere.codeplex.com/[/url], written by distantcam, allows much larger spheres to be generated.
[*]An application that converts arbitrary 3D shapes to voxels: [url="http://www.patrickmin.com/minecraft/"]http://www.patrickmin.com/minecraft/[/url]
Must not have more than 10000 characters on a single line.
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.
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.
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! :biggrin.gif:
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 **** me off. I figured it would be quite a tedious process to shape correctly.
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. :wink.gif:
>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? :smile.gif:
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
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.
Private Mod Note
Rollback Post to RevisionRollBack
My Youtube channel.
Contains Pachebel's Canon made with noteblocks, a working Rubik's cube made with pistons, and the ultimate TNT cannon.
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.
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.