I am programming a game and i can't find out the formula to spawn villages for newly created users.
This is how i want it to be. I want it to have a formula, where i give ID and it returns x, y coordinates. Its like the Nautilus shell spiral in x/y coordinates. I dont know how to explain, just giving an example.
Please in an easy-to-read way where i could make the formula with javascript.
ID x y
1 15 15
2 20 15
3 25 15
4 25 20
5 25 25
6 20 25
7 15 25
8 10 25
9 10 20
10 10 15
11 10 10
12 15 10
13 20 10
14 25 10
15 30 10
16 30 15
17 30 20
