Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Circles in Grids  (Read 7255 times)

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Circles in Grids
« on: March 07, 2011, 01:17:30 am »

This isn't my best area.  What's the best way to make a circle or curve using a grid?  I'd like some elegant curves and spirals, but I tend to think in terms of grids and have trouble making curves if I've got straight lines to work with.

beorn080

  • Bay Watcher
    • View Profile
Re: Circles in Grids
« Reply #1 on: March 07, 2011, 01:23:34 am »

I remember seeing a page on the wiki about it, but I can't find it anymore.

If you want a slow way to do it, you can zoom in on paint and use its circle tool on a pixel scale to get the size you want.
Logged
Ustxu Iceraped the Frigid Crystal of Slaughter was a glacier titan. It was the only one of its kind. A gigantic feathered carp composed of crystal glass. It has five mouths full of treacherous teeth, enormous clear wings, and ferocious blue eyes. Beware its icy breath! Ustxu was associated with oceans, glaciers, boats, and murder.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Circles in Grids
« Reply #2 on: March 07, 2011, 01:29:14 am »

The paint circles are kinda wonky, it can be tough to actually draw them the size you want.  Good for "freehanding" a circle but not as precise as I'd like.  A good circle-drawing tool must exist out there somewhere!  A free one!

Duke 2.0

  • Bay Watcher
  • [CONQUISTADOR:BIRD]
    • View Profile
Re: Circles in Grids
« Reply #3 on: March 07, 2011, 02:01:04 am »

 Paint.NET has a decent way of making circles the size you want from what I remember, but I don't think their circle drawing tool is perfect. I keep on getting circles that are not symmetric across two axises. If you can make it work then it can be a handy fortress planning tool(Layers oh my).
Logged
Buck up friendo, we're all on the level here.
I would bet money Andrew has edited things retroactively, except I can't prove anything because it was edited retroactively.
MIERDO MILLAS DE VIBORAS FURIOSAS PARA ESTRANGULARTE MUERTO

Nopkar

  • Bay Watcher
    • View Profile
Re: Circles in Grids
« Reply #4 on: March 07, 2011, 02:02:23 am »

I used this to make towers on minecraft...same rules apply
http://i50.tinypic.com/2lj71c7.png
Logged

-Jobs are to be assigned to Dwarves in alphabetical order, regardless of skill or specialization.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Circles in Grids
« Reply #5 on: March 07, 2011, 02:06:04 am »

I'm currently looking at the Midpoint-Circle Algorithm, but it's a lot of math involved...  If I can get it into a workable state, I may throw up a C++ program on DFFD that should -in theory- give a list of coordinates on where to place the dots to make a circle.  Since it's be incomplete and prone to cave-ins, you could easily add a layer by making another floor/wall one tile towards the inside of the circle, or outside, to make your circles 2-3 tiles thick.

Ninja'd: That's very handy, definitely saving that as well.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Circles in Grids
« Reply #6 on: March 07, 2011, 03:24:45 am »

http://en.wikipedia.org/wiki/Hexagonal_tiling

"The hexagonal tiling is the densest way to arrange circles in two dimensions"

It is also very easy to draw, once you figure out how big are your circles.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Circles in Grids
« Reply #7 on: March 07, 2011, 03:26:52 am »

Interesting but pointless.  That in no way helps me draw a circular fortress.  I know I didn't ask for that explicitly, but I did ask about grids and that's not the kind of grid we're talking about.

Dorf3000

  • Bay Watcher
    • View Profile
Re: Circles in Grids
« Reply #8 on: March 07, 2011, 03:40:24 am »

http://www.bay12forums.com/smf/index.php?topic=48882.msg1006863#msg1006863

This is what I use for circles (and bowls/domes).  There's a working download link on the 2nd page of the thread, it's just a html file that you can save and open from disk.
Logged
I had a tigerman get elected mayor and he promptly mandated 3 bowls of cereal.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Circles in Grids
« Reply #9 on: March 07, 2011, 03:50:01 am »

Ahhhhh fuck yes!  One for spheres and for circles!  I'm saving both of these!

parlor_tricks

  • Bay Watcher
    • View Profile
    • http://noyb
Re: Circles in Grids
« Reply #10 on: March 07, 2011, 04:04:24 am »

I'm not sure, but are you using quickfort? Its got a circle room pack which I use to make my circles. It does take some Google searching to get at the file though.
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Circles in Grids
« Reply #11 on: March 07, 2011, 04:12:22 am »

Nah, not quickfort.  I tried, but it tends to fail horribly when trying to designate towers.  Great for digging and placing furniture, but horrible for towers.  I use plain old macros instead.

MarcAFK

  • Bay Watcher
  • [INSANITY INTENSIFIES]
    • View Profile
Re: Circles in Grids
« Reply #12 on: March 07, 2011, 04:14:49 am »

http://en.wikipedia.org/wiki/Hexagonal_tiling

"The hexagonal tiling is the densest way to arrange circles in two dimensions"

It is also very easy to draw, once you figure out how big are your circles.

this doesn't help me draw circles, but it just gave me an idea on how to make square based hexagons for the burj i might possibly start building on my fort.,...
Logged
They're nearly as bad as badgers. Build a couple of anti-buzzard SAM sites marksdwarf towers and your fortress will look like Baghdad in 2003 from all the aerial bolt spam. You waste a lot of ammo and everything is covered in unslightly exploded buzzard bits and broken bolts.

flieroflight

  • Bay Watcher
  • Worship the nightmare
    • View Profile
Re: Circles in Grids
« Reply #13 on: March 07, 2011, 11:48:47 am »

i make circles in a

  [][]
[][][][]
[][][][]
  [][]
pattern expandind depending on size. they are only approx but they do for now.
Logged
Bay12 doesn't have moral event horizons, it has goals.

Duke 2.0

  • Bay Watcher
  • [CONQUISTADOR:BIRD]
    • View Profile
Re: Circles in Grids
« Reply #14 on: March 07, 2011, 11:52:13 am »

 In a square grid that just makes a diamond.
Logged
Buck up friendo, we're all on the level here.
I would bet money Andrew has edited things retroactively, except I can't prove anything because it was edited retroactively.
MIERDO MILLAS DE VIBORAS FURIOSAS PARA ESTRANGULARTE MUERTO
Pages: [1] 2