Code center > Darwinbots3
Bot testbed
Numsgil:
How about one full circle = 9000 units. That's 360 degrees * 25, which gives prime factors of 2^3, 3^2, 5^3. And it's relatively easy to remember. By comparison, 9720 gives prime factors of 2^3, 3^5, 5.
Another option is 8640, which is 360 * 24, which has prime factors 2^6, 3^3, 5. Not as easy to remember as 9000, but lets you split the full circle in to 64 equal slices instead of just 8, at the cost of not being able to slice things in to as many 5ths.
Yet another option is 9600. That's not a multiple of 360 degrees, but it does have a lot of nice dividers. Its prime factors are 2^7, 3, 5^2.
Shadowgod2:
Speaking of sin and cos how exactly do they work? Also im not really ginding any more bugs... at least not yet
Numsgil:
They take units in whatever forms a full circle (as of this moment, that'd be 1080), and convert them in to degrees (so in this case, divide the values by 3), then run sin/cos on them. Normally the results of sin and cos are in the range [-1, 1], but they get scaled so it's easier to make use of them, up to [-1080, 1080].
So for example, 90 degrees would be 360 units in Sunweaver. Sine of 90 degrees is 1.0, so 360 sin would return 1080.
spike43884:
--- Quote from: Numsgil on April 10, 2017, 10:32:29 AM ---How about one full circle = 9000 units. That's 360 degrees * 25, which gives prime factors of 2^3, 3^2, 5^3. And it's relatively easy to remember. By comparison, 9720 gives prime factors of 2^3, 3^5, 5.
Another option is 8640, which is 360 * 24, which has prime factors 2^6, 3^3, 5. Not as easy to remember as 9000, but lets you split the full circle in to 64 equal slices instead of just 8, at the cost of not being able to slice things in to as many 5ths.
Yet another option is 9600. That's not a multiple of 360 degrees, but it does have a lot of nice dividers. Its prime factors are 2^7, 3, 5^2.
--- End quote ---
Where'd 9600 come from?
Anyway, 9000 seems a pretty nice value.
If you want to get close to 9999 then the following options:
9360 is 360*26 giving 2^4,3^2, 5 and 13.
9720 as you mentioned is 360*27 giving 2^3, 3^5 and 5 however is a bit of a weirder one for remembering.
9900 is 55*180 giving 2^2,3^2, 5^2 and 11. (quite a nice pattern of squares there...)
9990 is 111*90 giving 2, 3^3 , 5 and 37.
I don't think there is really many other sensible alternatives as multiples of 45,90,180 or 360
Numsgil:
--- Quote from: spike43884 on April 11, 2017, 08:53:22 AM ---Where'd 9600 come from?
Anyway, 9000 seems a pretty nice value.
--- End quote ---
Okay, I might just go with 9000, even though I think 9600 is better in a lot of ways, since 9000 is both a round number and evenly divided by 360, which should make math easier for humans.
In terms of where they come from: the prime factors help to determine how many different ways you can divide up the full circle evenly. 3, 4, and 6 are important, since triangles, squares, and hexagons form a full tesselation of the plane, and are the only regular shapes to do so, so you need some multiple of 12 at least (the lowest common multiple of 3, 4, and 6).
If you ever wondered why there's 360 degrees in a circle, it's because it's the closest round number to 365 in base 60 (which was the base the Sumerians used thousands of years ago). Their number system was base 60 because it makes math easy: 60 divides cleanly in to all sorts of different divisors. For Darwinbots, we have a similar requirement. The more ways there are to divide the circle in to even parts, the more different symmetries are possible, or at least easy. The prime factors show you the raw ingredients to combine to divide the circle up.
2 is an important prime factor, because splitting things in to halves, or quarters, or sixteenths, etc. are very natural ways to break things apart, and can easily mimic the way cells in biology cleave in half during reproduction. 3 is important, but multiple copies of 3 aren't so much: being able to split things in to thirds and being able to represent 30, 45, and 60 degrees is important, but being able to represent 40 degrees or divide things in to 9ths isn't very important.
Sunweaver is sort of built to be base 10, to make math easy for humans, so 5 is an important factor in so far as 10 is.
But 7 isn't an important factor. It would let you split circles in to 7ths, but there probably isn't much call for that. As the prime factors get larger, they become less useful. About the only use 101 would be for is if the bot had 101 segments. Otherwise there's not much call for splitting a circle evenly in to 101 pieces.
So generally speaking finding a good number is balancing the needs for 2, 3, and 5 as prime factors, taking up as much of the [0,9999] range as possible, and making it easy for humans to do the math.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version