Live data from Hacker News

Using prime numbers to make better backgrounds

designfestival.com

31–40 of 57 posts

Re: Using prime numbers to make better backgrounds

#31

What's wrong with the "cicada theory" 1. The most common cicadas come out every year or every other year. 2. The 17-year cicadas (for example) don't come out once every 17 years -- they come out every single year. Just in different broods (groups differing by phase). Some broods are much bigger than others of course, and broods are often located in different parts of the country, but many broods can and do overlap. S…

I'm guessing they're 13 and 17 year cicadas because that's how long it takes to develop.

That's a tautology. "A baby takes 9 months to be born because that's how long it takes to develop." Well, yes, but the question becomes, why does it take that amount of time to develop? Were there direct selection pressures acting on that length of time, or is that length of time mostly a function of other variables which are acted on directly by selection pressure?

Re: Using prime numbers to make better backgrounds

#32

This is the perfect Hacker News article. I learned something new and mathematically-interesting about the natural world, the author came up with a clever hack to enliven backgrounds, and we learn how to apply that to improve our own designs.

Totally agree. There have been quite a few articles recently that fall into this category. pquerna's recent post about OpenSSL memory in node (and elsewhere) is another that comes to mind. http://news.ycombinator.com/item?id=2411144 keep 'em coming I say!

Upvoted solely for "keep 'em coming!"

This article was truly awesome. I'm kicking myself for having not thought of it before because it seems like such a simple concept! Makes me wonder what else out there I haven't thought of... ;)

Re: Using prime numbers to make better backgrounds

#33

And some people still question the value of pure math. These design tricks would anger some of my design friends, who still believe you can be left brain OR right brain.

Yeah what's up with that?! I think in this day and age people are more than capable of being both highly creative and logical.

Re: Using prime numbers to make better backgrounds

#34
post #5

Cool, but these numbers don't have to be primes. They just have to be coprimes (like (8,9)). The least common multiple of two coprimes 'a' and 'b' is a*b. http://en.wikipedia.org/wiki/Coprime

Not for the cicada example, but yes for the web aspect. In the cicada example the point is that one predator would evolve to align its boom cycle so that it had a common divisor with the cycle of the cicada. Since the predator's cycle is variable, it is evolutionarily optimal if the cicada only comes out every prime number of years.

Why can't the predators evolve to have the same cycle as the cicadas, with a prime number of years?

Re: Using prime numbers to make better backgrounds

#36
post #34

Earlier quoted context omitted.

Not for the cicada example, but yes for the web aspect. In the cicada example the point is that one predator would evolve to align its boom cycle so that it had a common divisor with the cycle of the cicada. Since the predator's cycle is variable, it is evolutionarily optimal if the cicada only comes out every prime number of years.

Why can't the predators evolve to have the same cycle as the cicadas, with a prime number of years?

They can, but by being so highly variable, the cicada boom cycle becomes a less important survival driver than other factors, such as predator cycles, weather, etc. In a closely-paired ecosystem, with relatively few variables, you do see remarkable coevolution between predators and prey. When the prey removes their boom cycle from the dominant evolutionary stressors on the predator, differential survival of the predator will be determined far more by the dominant factors.

It's important to note that, for the cicada, they are not a staple diet but rather an opportunistic one that occurs only once in a few generations. This means that the predator's cycle would have to skip generations in order to be effective. This is unlikely, given that that cycle would have no evolutionary advantage in the intermediary, and would thus be diluted by more pressing concerns.

Re: Using prime numbers to make better backgrounds

#37

What's wrong with the "cicada theory" 1. The most common cicadas come out every year or every other year. 2. The 17-year cicadas (for example) don't come out once every 17 years -- they come out every single year. Just in different broods (groups differing by phase). Some broods are much bigger than others of course, and broods are often located in different parts of the country, but many broods can and do overlap. S…

Consider, though, that these groups of cicadas don't really "care" about one another from a genetic standpoint. If the broods don't interact, they're basically different sets of genes that only interact via mutations, so the principle still holds. What's interesting about that is how the broods might diverge to coprime emergence schedules to prevent competition.

Well, they do care. The idea is to starve out predators. If there is another set of cicadas feeding them, then it doesn't work for just you to avoid them.

Re: Using prime numbers to make better backgrounds

#38
ONLINE STORE: http://www.fullmalls.com )====

http://www.fullmalls.com )====

Air jordan(1-24)shoes $30

Handbags(Coach l v f e n d i d&g) $35

Tshirts (Polo ,ed hardy,lacoste) $15

Jean(True Religion,ed hardy,coogi) $30

Sunglasses(Oakey,coach,gucci,A r m a i n i) $15

New era cap $12

Bikini (Ed hardy,polo) $20

accept paypal and free shipping

http://www.fullmalls.com )====

http://www.fullmalls.com )====

http://www.fullmalls.com )====

http://www.fullmalls.com )====

http://www.fullmalls.com )====

http://www.fullmalls.com )====

http://www.fullmalls.com )====

http://www.fullmalls.com )====

Re: Using prime numbers to make better backgrounds

#39

Wow, very impressive! I will definitely be trying this out. It reminded me of my discrete mathematics class, so now I'm wondering if there are any other cool principles that can be applied to design

892 unique ways to partition a 3x4 grid: http://www.dubberly.com/concept-maps/3x4grid.html

They also have an interactive tool that generates HTML/CSS: http://www.3x4grid.com

Re: Using prime numbers to make better backgrounds

#40
post #10

I won't get a chance to write this up, but in a similar vein, if you split the grain/texture off of an image, you can scale and stretch the image as needed, then drop a fairly small, tiled grain texture back on top. I think it is nicer to do two grain textures, one for lighter and one for darker. Make the grain image be solid white or black and put the grain in the alpha channel.

Hey guys, I actually mocked up a woodgrain test page while I was developing the article but I ended up preferring the lego and curtain examples. But if your interested:

http://www.sitepoint.com/examples/primes/woodgrain.html

It's not bad, but I don't think it's killer yet.

I've got a very raw maze generation example somewhere if anyone's interested.

Post reply on HN