Live data from Hacker News

Using prime numbers to make better backgrounds

designfestival.com

11–20 of 57 posts

Re: Using prime numbers to make better backgrounds

#11

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

Fair point, it's really basic combinatorics but well applied and properly executed.

Re: Using prime numbers to make better backgrounds

#12
This is very well explained, but not all that novel. Brian Eno used to generate long soundscapes like this, using loops of mutually prime lengths of time.

Edit: See also -

http://en.wikipedia.org/wiki/Ambient_1:_Music_for_Airports

http://en.wikipedia.org/wiki/Generative_music

Re: Using prime numbers to make better backgrounds

#13
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.

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

Re: Using prime numbers to make better backgrounds

#14
post #6

They're also useful for reverb effects, in very much the same way. See http://www.npr.org/2010/08/03/128935865/queens-brian-may-roc... (under "On The 'Stomp-Stomp-Clap' Section Of 'We Will Rock You'") Also, I think the technique will work as long as the numbers are relatively prime, which may be a bit easier to design around.

Using coprime-length looping rhythms on top of each other can also create some pretty interesting sounds.

Take a rhythm in 4/4 (say a standard rock snare backbeat, playing on the second and fourth note of a four note bar), layer on a cymbal pattern which repeats every three notes, then a bass drum pattern which repeats every five notes. The effect is fairly subtle because the snare keeps everything sounding like 4/4, but the feel of the rhythm is constantly shifting.

I found a nice YouTube video demonstrating this a while back, but unfortunately all I can find now is videos of polyrhythms where the loops all have the same duration but different numbers of beats per duration... which is an interesting technique in and of itself :)

Re: Using prime numbers to make better backgrounds

#16

This is very well explained, but not all that novel. Brian Eno used to generate long soundscapes like this, using loops of mutually prime lengths of time. Edit: See also - http://en.wikipedia.org/wiki/Ambient_1:_Music_for_Airports http://en.wikipedia.org/wiki/Generative_music

Yes it is a known technique also in 3D games. Related, but more complicated (research) topic is infinite/arbitrarily-sized non-looping texture generation from arbitrary sample images.

http://www.cs.sunysb.edu/~vordonezroma/texturesynth.pdf

(There are some mind blowing generated images in the linked PDF.)

Re: Using prime numbers to make better backgrounds

#17
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

Indeed. If you already have one tile that's, say 50px wide, you can easily find coprime sizes:

http://www.wolframalpha.com/input/?i=coprime+to+50

Re: Using prime numbers to make better backgrounds

#18

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.

Post reply on HN