Solved [Advanced] List of Locations in a square spiral

Discussion in 'Plugin Development' started by Quantum64, Aug 2, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Quantum64

    So basically I need to get a list of locations in a pattern like this:
    [​IMG]
    And be able to access any of them on demand, which is why I need a method like getLocation(int i), returning the x and z values of the corresponding number, rather than storing them in a list, as theoretically I could need an indefinite number of locations. For reference, the lines shown on the picture can represent a 500 block distance.

    I've tried everything I can think of, but I know there must be a way to dynamically work this out. Any help would be appreciated!
     
  2. Slikey seems like a Meth guy.
     
  3. Offline

    xTigerRebornx

    KingFaris11 and Quantum64 like this.
  4. Offline

    bobacadodl

    That's the ulam spiral. Pretty sure you can find tons of resources online for ulam spiral generators...
     
    KraZ__ likes this.
  5. Offline

    Quantum64

    Thanks for the attempt KraZ__ (Also a list of locations is exactly what I didn't want). Still looking for help.
     
  6. Offline

    BaranCODE

  7. Offline

    1Rogue

  8. Offline

    Slikey

  9. Offline

    Quantum64

    Finally figured it out, thanks for all the help everyone :)
     
Thread Status:
Not open for further replies.

Share This Page