WTF is this?

The images you see on this blog are output from various Ulam spiral generators I built in Flash, Python and most recently using Arduino. Generally, each dot in an image represents a number with integer 1 at center. In addition to writing algorithms to test each number for primality within a set I have discovered that an infinite number of calculations can be performed to create new designs and animation algorithms. The simplicity and speed of these algorithms make them an ideal fit for embedded systems graphics, scientific, mathematical and artistic explorations.

Saturday, June 14, 2008

Sin mod n, Square roots and PI

Calculation: if(Math.round(Math.sin(n))%6==0){//paint it!} As it turns out, it doesn't need to be 6 to generate this pattern because we round the SIN calculation first. So, if(Math.round(Math.sin(pInt)*Math.PI)%3==0){...} generates this:

And then there's this...

if(Math.round(Math.sqrt(pInt)*3.14159265)%2==0){//draw Tempest!}

Same formula as above but showing only the prime numbers.

And again with the primes blurred to enhance the pattern they create.

Same stuff, modding 3 this time:

Modulo 4:

Let's take the average of PI and the Golden Ratio and mod that by 2...Holy guacamole!

So if you were looking for a visual representation of what the relationship amongst primes and PI and PHI might look like, look no further.

Calculation per dot: (Math.round(Math.sqrt(Math.pow(pInt,2))*(1.6180339887*3.14159265)/2)%5==0)

No comments: