Bay 12 Games Forum

Dwarf Fortress => DF Gameplay Questions => Topic started by: accoro on July 29, 2011, 01:11:11 pm

Title: That darned elusive circle...
Post by: accoro on July 29, 2011, 01:11:11 pm
Circles - how do you mine out circular rooms? I am terrible at this, I always end up with diamond shaped rooms. Halps :(
Title: Re: That darned elusive circle...
Post by: Graebeard on July 29, 2011, 01:21:40 pm
There are a few methods you can use.  This thread (http://www.bay12forums.com/smf/index.php?topic=30589.0) has some helpful templates and an auto hot key program I've used a lot.

You can also open up MS Paint, select the oval tool, zoom all the way in, and draw a circle by holding shift while you drag the mouse.  Just fill in corners as needed.
Title: Re: That darned elusive circle...
Post by: Calathar on July 29, 2011, 01:59:47 pm
It might be worth mentioning that with vanilla DF, while not full screened and at the default zoom, the vertical pixel count for each tile doesn't equal the horizontal pixel count.  So if this is the case for you, you won't ever get rooms that appear circular, even if you are digging out the correct tiles. 
Title: Re: That darned elusive circle...
Post by: MiniMacker on July 29, 2011, 09:02:17 pm
Something to take note of is that a square is "technically" round in Dwarf Fortress, since it takes the same amount of time for something to go diagonally as it takes for it to go in any other direction.

Which must mean that circles are squares.

But squares are also circles.


Spoiler (click to show/hide)
Title: Re: That darned elusive circle...
Post by: Starver on July 29, 2011, 09:29:31 pm
If DF squares are more like RL circles, then DF 'circles' are more like diamondesque four-pointed stars IRL.

Don't know if it copies/displays well on everyone's machine/browser, but character 2726 works well as an example (for those that don't want to run their own plotting program or spreadsheet graph of the problem) and follows below:
Title: Re: That darned elusive circle...
Post by: Guedez on July 29, 2011, 10:52:43 pm
If DF squares are more like RL circles, then DF 'circles' are more like diamondesque four-pointed stars IRL.

Don't know if it copies/displays well on everyone's machine/browser, but character 2726 works well as an example (for those that don't want to run their own plotting program or spreadsheet graph of the problem) and follows below:


i give you 10 urists for finding out the existence of this character
Title: Re: That darned elusive circle...
Post by: Aoi on July 29, 2011, 11:05:19 pm
Great. In addition to Dwarfy physics, we've also concluded they use non-Euclidian geometry. When will the madness end?!
Title: Re: That darned elusive circle...
Post by: Starver on July 29, 2011, 11:12:31 pm
Great. In addition to Dwarfy physics, we've also concluded they use non-Euclidian geometry. When will the madness end?!
That could be difficult to answer if there's an infinite area but a finite border or a finite area with an infinite border.  (Or a finite (and toroidal) area with no border, but we aren't playing Asteroids here... :) )

Title: Re: That darned elusive circle...
Post by: Graebeard on July 29, 2011, 11:19:12 pm
It's things like this why I want the philosopher back so bad.  Imagine if you had this guy (http://en.wikipedia.org/wiki/Nikolai_Lobachevsky) running around your fort.
Title: Re: That darned elusive circle...
Post by: Urist_McArathos on July 29, 2011, 11:24:17 pm
It might be worth mentioning that with vanilla DF, while not full screened and at the default zoom, the vertical pixel count for each tile doesn't equal the horizontal pixel count.  So if this is the case for you, you won't ever get rooms that appear circular, even if you are digging out the correct tiles.

The default does come with an alternate tileset that has perfectly square tiles.  You still have to take care to get "circular" rooms, but that will help correct the ridiculous "diamondy" nature of the default set.
Title: Re: That darned elusive circle...
Post by: Graebeard on July 29, 2011, 11:26:02 pm
You know, this used to really bother me.  If I'd known there were square tilesets when I started I probably would have used them.  Now I'm so used to it, though, that square rooms just look wrong.
Title: Re: That darned elusive circle...
Post by: Lezard on July 30, 2011, 12:38:37 am
Something to take note of is that a square is "technically" round in Dwarf Fortress, since it takes the same amount of time for something to go diagonally as it takes for it to go in any other direction.

Which must mean that circles are squares.

But squares are also circles.


Spoiler (click to show/hide)

I just threw up....
Title: Re: That darned elusive circle...
Post by: Jurph on July 30, 2011, 08:11:56 am
Something to take note of is that a square is "technically" round in Dwarf Fortress, since it takes the same amount of time for something to go diagonally as it takes for it to go in any other direction.

Which must mean that circles are squares.

But squares are also circles.


Spoiler (click to show/hide)

Wrong -- diagonal movement costs 1.4 squares of movement.  A nice circle of diameter 15 is rows of 5,9,11, two rows of 13, five rows of 15, two 13s, 11, 9, 5.  It's 7 tiles flat-to-flat, and 5*1.4 = 7 tiles diagonally.  I use it for my cylindrical layouts.
Title: Re: That darned elusive circle...
Post by: Starver on July 31, 2011, 04:30:35 pm
Wrong -- diagonal movement costs 1.4 squares of movement.

I've previously quoted that information, but others have said that there's no basis for this, so I don't throw this fact around any more and go with the apparently more provable "Modified Manhattan" distance.  Still, we can deal with it being otherwise.
Title: Re: That darned elusive circle...
Post by: BigD145 on July 31, 2011, 09:31:57 pm
Wrong -- diagonal movement costs 1.4 squares of movement.

I've previously quoted that information, but others have said that there's no basis for this, so I don't throw this fact around any more and go with the apparently more provable "Modified Manhattan" distance.  Still, we can deal with it being otherwise.

a squared + b squared = c squared

Basic geometry of a right triangle.
Title: Re: That darned elusive circle...
Post by: GreatWyrmGold on July 31, 2011, 09:42:20 pm
Wrong -- diagonal movement costs 1.4 squares of movement.

I've previously quoted that information, but others have said that there's no basis for this, so I don't throw this fact around any more and go with the apparently more provable "Modified Manhattan" distance.  Still, we can deal with it being otherwise.

a squared + b squared = c squared

Basic geometry of a right triangle.
He's reffering to that info needing verification in DF movement costs.
Title: Re: That darned elusive circle...
Post by: Starver on August 01, 2011, 12:17:31 am
Wrong -- diagonal movement costs 1.4 squares of movement.

I've previously quoted that information, but others have said that there's no basis for this, so I don't throw this fact around any more and go with the apparently more provable "Modified Manhattan" distance.  Still, we can deal with it being otherwise.

a squared + b squared = c squared

Basic geometry of a right triangle.
He's reffering to that info needing verification in DF movement costs.

Also, 4N and 3W would be a total distance of 5 IRL (good old Pythagoras), but:
distance 7 by Manhattan[1], which it definitely isn't
distance 4 by Modified Manhattan[2], which most people work with
distance 5.243... by Manhattan With Diagonals[3], which is the possible (but unproven) alternative where only exact orthagonals and diagonals are strictly an analogue to RL[4].

[1] (|x|+|y|)
[2] (max(|x|,|y|)
[3] (min(|x|,|y|)*sqrt(2))+|(|x|-|y|)|
[4] At short distances, this is more than absorbed in the tile-to-tile measurement discontinuity, but a radius 100 circle would have the point 60x80 from the centre 4..5 tiles 'wrong' from true equidistance with its more accurate cousins, depending on how accurate the diagonalising factor is[5]...
[5] And if you did the calculations based on centre-to-centre or edge-to-edge (both inner or both outer!).
[X] I can't blame the above footnote storm on too little sleep, I only just woke up!
Title: Re: That darned elusive circle...
Post by: mrbaggins on August 01, 2011, 01:16:03 am
Pretty simple to test.

Make a test run L shaped 10 long and 10 down.
Make a test run diagonal at 14 squares.
Make a test run diagonal at 10 squares.

Race.
Title: Re: That darned elusive circle...
Post by: Osdeath on August 01, 2011, 03:30:24 am
It's things like this why I want the philosopher back so bad.  Imagine if you had this guy (http://en.wikipedia.org/wiki/Nikolai_Lobachevsky) running around your fort.

I'm imagining that he'd hit his head on the ceiling a lot.