Jump to content




Sphere and Dome Builder


  • You cannot reply to this topic
90 replies to this topic

#1 pruby

  • Members
  • 48 posts
  • LocationWellington, New Zealand

Posted 08 April 2012 - 11:41 AM

Hi all,

I've been experimenting with computercraft turtles and have put together a program for building spheres and domes based on the method descibed at http://www.minecraft...eprints-inside/ with some optimisations. The spheres produced are completely sealed (no holes) and include no unneccesary blocks - removing and block will leave a hole. This is purely a construction program, will never clear space and does not require a mining turtle. To use, extract and copy sdbuild to the turtle (or cc-get install sdbuild), place the turtle at the bottom centre of where you want to build the sphere or dome, and run:

For a sphere:
sdbuild sphere <radius>

For a dome:
sdbuild dome <radius>

You might want to do this from in front of it - it starts by moving backwards. The structure will extend the radius to each side of the centre.

The turtle will stop and wait for assistance if any movement is blocked or it runs out of materials, allowing the player to remove obstructions or top up materials without it losing track of where it's up to. It will not stop if it can't place a block - continues on. Tall grass can make it leave gaps at the base - check and tidy up if needed. If it stops, check the screen to see why.

Maybe just a small shelter for the night? Wooden planks, radius 3:

Posted Image


I built a larger one out of glass to create a pleasant, safe place to sleep with a fountain and trees. Glass block dome, radius 16:

Posted Image

This should be able to scale to very large sizes - plans the structure in small slices as it builds so shouldn't hit the processing limits.

Some tweaks may come - some little cosmetic issues and efficiency gains. In particular the movement is efficient for the "steep" layers (bottom of dome, mid sphere) but gets pretty inefficient on the nearly flat layers (i.e. top of the dome, top and bottom of spheres).

Attached Files



#2 wilcomega

  • Members
  • 466 posts
  • LocationHolland

Posted 08 April 2012 - 03:08 PM

very nice work i have to say

#3 EatenAlive3

  • New Members
  • 53 posts

Posted 10 April 2012 - 09:10 PM

Awesome!

#4 Halleyelec

  • New Members
  • 6 posts

Posted 10 May 2012 - 08:21 AM

Hi,

first of all I love this!

Secondly, Im not sure if its an issue with Turtles in general but when my Turtle is say creating a sphere, I save and exit then reload, the turtle running your program seems to stop. Are you aware of this?

Like I said, im not sure if its all programs or just yours...

#5 BigSHinyToys

  • Members
  • 1,001 posts

Posted 10 May 2012 - 05:01 PM

View PostHalleyelec, on 10 May 2012 - 08:21 AM, said:

Hi,

first of all I love this!

Secondly, Im not sure if its an issue with Turtles in general but when my Turtle is say creating a sphere, I save and exit then reload, the turtle running your program seems to stop. Are you aware of this?

Like I said, im not sure if its all programs or just yours...
all computers and turtles shutdown when you leave the game. that means when you boot it again the turtle or computer will have lost all its vars and the program will not be running. This can be fixed bt maing the turtle save its pos in a file but that is not realy a good solution. for the time being just make shore you have finished any builds before closing.

#6 Halleyelec

  • New Members
  • 6 posts

Posted 10 May 2012 - 05:54 PM

View PostBigSHinyToys, on 10 May 2012 - 05:01 PM, said:

View PostHalleyelec, on 10 May 2012 - 08:21 AM, said:

Hi,

first of all I love this!

Secondly, Im not sure if its an issue with Turtles in general but when my Turtle is say creating a sphere, I save and exit then reload, the turtle running your program seems to stop. Are you aware of this?

Like I said, im not sure if its all programs or just yours...
all computers and turtles shutdown when you leave the game. that means when you boot it again the turtle or computer will have lost all its vars and the program will not be running. This can be fixed bt maing the turtle save its pos in a file but that is not realy a good solution. for the time being just make shore you have finished any builds before closing.

Thanks for this! Least I know now!

Dammit I have 5 half complete death stars!! lol Maybe I can make them into "Honey I shrunk the kids" and turn them into cereal bowls!!

#7 neto333

  • New Members
  • 16 posts

Posted 17 May 2012 - 07:38 PM

Thank you :P/>.

#8 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 25 July 2012 - 08:37 PM

WOW, I love this! I just started my turtle running a 50 wide dome, and after 10 minutes, it finally completed it's second layer! I suspect feeding it a LOT of blocks.

Tempted to tell it to build a 100 wide sphere on a flat world, but afraid to think how long I would have to leave my computer running just to start that first layer...Also, whoever can have it constantly save it's position and state would be my absolute HERO, since I have to constantly restart my private server I run.

#9 ManWhoCrafts

  • New Members
  • 2 posts

Posted 18 August 2012 - 10:09 PM

First of all thanks to pruby for this awesome program. Is there anyway I can start the programs at a particular level? My problem is I've started building a 160 Diameter sphere (it's going to be a Death Star!) that stopped around level 43 due to Minecraft crashing, and I don't really fancy starting again as it took about 6 hours to get this far! Any help would be appreciated....

#10 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 18 August 2012 - 11:21 PM

View PostManWhoCrafts, on 18 August 2012 - 10:09 PM, said:

First of all thanks to pruby for this awesome program. Is there anyway I can start the programs at a particular level? My problem is I've started building a 160 Diameter sphere (it's going to be a Death Star!) that stopped around level 43 due to Minecraft crashing, and I don't really fancy starting again as it took about 6 hours to get this far! Any help would be appreciated....
Not without making changes to the program. It doesn't save its state as it goes. Maybe in a future release?

#11 Warlordjones

  • Members
  • 3 posts

Posted 25 September 2012 - 08:41 PM

Any chance of an ellipse builder?

#12 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 25 September 2012 - 08:50 PM

View PostWarlordjones, on 25 September 2012 - 08:41 PM, said:

Any chance of an ellipse builder?
I suppose if you worked on the code a little, you could tweak the math and have it do what you want.

#13 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 26 September 2012 - 09:19 PM

I took a look at the code real quick (used it before btw, very handy). The code isn't really made for such an adaption I believe. It's mainly written from a symetric perspective. The implementation of two different radi would be rather hard IMO.

#14 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 26 September 2012 - 09:21 PM

I'd say that if you are a math wiz, feel free to make your own version. I am no such person, so nope....

#15 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 26 September 2012 - 09:31 PM

Well, the algorithm used is very good for spheres. I couldn't even get near that efficiency when using an ellipse as base. I don't think I could make something build ellipses as good as this programs builds spheres. And I don't really need ellipse-shaped sphere thingies anyways. :P/>

#16 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 26 September 2012 - 09:33 PM

What do you need an ellipse for anyway?

#17 pruby

  • Members
  • 48 posts
  • LocationWellington, New Zealand

Posted 27 September 2012 - 12:15 AM

View PostWarlordjones, on 25 September 2012 - 08:41 PM, said:

Any chance of an ellipse builder?

I'm not entirely sure that the gap-free condition will hold but you could scale along the x axis fairly easily.

Given:

local stretch = 1.2

You'd need to change everywhere that sets xstart and xend:

		  xstart = math.floor(radius * stretch)
		  xend = math.ceil((radius + max_offset_x) * stretch)

And divide x axis distances by this when doing radius checks:

(((radius - (x + dx)) / stretch) ^ 2 + (radius - (y + dy)) ^ 2 + (radius - (z + dz)) ^ 2) ^ 0.5 >= boundary_radius

Those aren't the only pieces of code you'd need to change but it's all the same theme. I'm not planning to put in ellipse support, but please let us know if you do!

#18 psidingu

  • New Members
  • 2 posts

Posted 23 November 2012 - 03:08 AM

Hi all,
how can I install this in Minecraft? Thanks in advance

#19 pruby

  • Members
  • 48 posts
  • LocationWellington, New Zealand

Posted 23 November 2012 - 11:26 AM

1. Install computercraft mod.
2. Follow instructions at http://cc-get.djranger.com/ to turn on http and install cc-get.
3. Build a turtle and type "cc-get install sdbuild" on the console.

Good luck ;)/>

#20 psidingu

  • New Members
  • 2 posts

Posted 24 November 2012 - 01:35 AM

How can I install computercraft? It says on yt that I have to install too many items or other stuff for it to work. Is this true?

Thank you!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users