Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
40oz

Spiral shaped sector

Question

I want to make a spiral out of sectors such as the one shown below. Is there an automated way to do this, such as with the curve linedef tool? Or am I going to have to freehand it?

 

OpLStjX.png

Share this post


Link to post

15 answers to this question

Recommended Posts

  • 0

I'd probably start by using draw circles mode, and then connect various vertices and then do sector joins/merges to create the desired effect. Then tweak them by hand for a better curve.

Share this post


Link to post
  • 0

There is prolly a better way, but off the top of my head I'd suggest drawing lines systematically from the longest to shortest and curving each line with the tool as soon as it's drawn to make space for the next line. You can kinda trace it out on that pic you've posted, starting with the border in the bottom left and making straight lines through the pic, imagining curving that straight line to be the border, while also making room for a clean next line for the opposing border, starting in the top left. The more mathematically and systematically you approach it, the cleaner they should turn out.

Share this post


Link to post
  • 0
1 minute ago, Fonze said:

There is prolly a better way, but off the top of my head I'd suggest drawing lines systematically from the longest to shortest and curving each line with the tool as soon as it's drawn to make space for the next line. You can kinda trace it out on that pic you've posted, starting with the border in the bottom left and making straight lines through the pic, imagining curving that straight line to be the border, while also making room for a clean next line for the opposing border, starting in the top left. The more mathematically and systematically you approach it, the cleaner they should turn out.

Yeah, changing the grid size is a good idea for that...

Share this post


Link to post
  • 0

I like spirals :)

self plug:  https://www.doomworld.com/idgames/levels/doom2/Ports/megawads/dmp2015 dmp2015b.wad map06 (made from concentric octogons)

other example i did just now SpiralExample.zip (concentric hexagons and concentric ten-agons)

 

Basically, you just inscribe shapes inside of shapes until you have a circular mosaic of sectors you can just color in with a spiral, like a children's cell-shaded coloring book.  More detailed description below of my particular method.

 

 

Tutorial:

-Sector-building phase-

1. Build a regular polygon using circle building tool; make sure the polygon has even number of sides.  this will be the base shape to serve as out-most bounding perimeter of your spiral.

2. If your base has 2n sides, then inscribe an n sided regular polygon inside of it.

3. Repeat step 2 but line-join the remaining n vertices that weren't used in step 2 to make the same shape as Step 2 but mirrored.

   - for Step 2+3, make sure to only use vertices that already exist up to this point; each new line you form in Step 3 will splice the interior lines of Step 2

4. If you did 2 and 3 right, you now have another 2n sided regular polygon, with the exception of doom-pixel rounding error that doesn't matter much.

5. Start again from Step 1, but use this interior polygon; recurse these steps until the center is very very small.

 

-Spiral Painting phase-

1. Take note that from Sector-building phase gives you a layered "onion".  Each shell of the onion forms a tessellated circle made of triangles.

2. Take the outmost layer and pick two adjacent triangles that are both inside this layer (I define adjacency by shared faces, not vertices, ); color these two chosen triangles a different color.  the color you desire your spiral to be.

3. Note that one of the triangles you chose shares a face with a triangle in the next onion-ring inwards;  repeat Step 2 from this next triangle, but from this new inner shell instead of the last.

4.  Repeat this process recursively, going inward towards the center, until you hit the center of the spiral.

Note: this only completes one prong of the spiral; if you are making a spiral from a 2n sided polygon, you will have to do the Spiral Painting phase n times.

 

Bonus points if you make each sector a conveyor-belt so you can swirl around like toilet bowl :)

Edited by NoisyVelvet : dmp2015b.wad not dmp2015.wad; e2, clarification.

Share this post


Link to post
  • 0
1 hour ago, Nine Inch Heels said:

Start like so:

 

[images removed]

 

EDIT: Whole procedure took waaay less than 3 minutes

That screenshot makes the nodebuilder weep.

 

EDIT: I suppose I should be at least somewhat constructive here.  Hand-built may be harder, but it's more likely to produce palatable results for the engine.  Ribbiks hand-draws all of his curves.

Share this post


Link to post
  • 0
5 minutes ago, Cynical said:

palatable results for the engine.

I'd argue that you can simply do things as I did, and then do some finishing touches to get rid of unneeded vertices. Should still be faster than doing everything free-hand, and probably also a bit better in terms of geometry by producing a more regular shape right away.

Share this post


Link to post
  • 0

It's not just vertex count; it's relation to grid.  Decimal grid numbers is how you get nodebuilder errors.  Putting everything on the grid at 1 unit margins and making it look right would take about as much work as just drawing it by hand in the first place.

Share this post


Link to post
  • 0

GZDB autosnaps vertices to the appropriate grid for the format. DBX might have added this feature already, and if not I'm sure Anotak would be willing to include it.

Share this post


Link to post
  • 0
6 minutes ago, Cynical said:

It's not just vertex count; it's relation to grid.  Decimal grid numbers is how you get nodebuilder errors.  Putting everything on the grid at 1 unit margins and making it look right would take about as much work as just drawing it by hand in the first place.

Won't happen with "snap to grid" being active. I just tested different sizes and vertice counts and there were no vertices with decimal locations, not even in the centre. (Tested in DB2)

Share this post


Link to post
  • 0
5 hours ago, Nine Inch Heels said:

EDIT: Whole procedure took waaay less than 3 minutes

But that's not a spiral shaped sector. It's a set of free standing linedefs in a spiral. You could do this without the tool.

Share this post


Link to post
  • 0

@Nevander



prespiral.jpg.a4a91fa022e192dadd95850e1b794f3e.jpg

 

The benefit of the method that NIH described is that you only have to use orthogonal lines.  A lot of the work is done by hitting the curve tool and typing in '90 degrees'.

 

Using the method that NIH mentioned, just run the second spiral alongside the first, then curve every line into a 90 degree arc.  Afterwards you just close off the sector. where you need it.

Note: above pic gives a simple linear spiral.  To get that sweet, retracting spiral that 40oz has in OP, when you are drawing each subsequent orthogonal line, make the next line's length a fraction (like 80%) of the previous and round to the nearest grid unit.  If you wanna be robust you can use a calculator after drawing each line, but winging it looks good too.  You might want to manually massage the very center of the result, but you will be like 95% done making your spiral at this point.



taperedspiral.jpg.47374e7242077fcfe2cafce83152aa31.jpg

 

Share this post


Link to post
  • 0
9 hours ago, Nevander said:

But that's not a spiral shaped sector. It's a set of free standing linedefs in a spiral. You could do this without the tool.

It's about how to get a spiral shape fast and easy. if you want a sector you basically draw the same thing twice, and it gets you what you want. Simple.

 

Besides, doing it with the tool is faster and more accurate. I'm not sure how any other method could be better for what the OP wants.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×