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, November 1, 2008

Jaco Pastorius, Meet Stanislaw Ulam



These are all using a very simple test for n, round( pow(pInt,sqrt(1))/pi )%2==0





Enter Jeff Buckley




...and Jimi


Friday, October 31, 2008

Respliced Satellite Maps

Some tinkering with PIL and Google Maps produced these cartographic miscarriages:

And yes, we're still doing this with basic Ulam spiral algorithm.

Test: round( pow(sqrt(pInt)/e, 1.2) )%3==0


test: round( pow(sqrt(pInt)/e, 1.2) )%5==0


test: round( pInt/e )%3==0


Land-o-Lakes


Borrowing from Myka's number testing algorithm, I've introduced the x and y coordinates into the mix. The test round((pi*pX)*(pY)*pInt)%2==0
appears in Myka's Square series. Thanks for the math, mofo. Of course, the resulting imagery differs greatly. My functions seem to lack the additional voodoo required to create the interference patterns.





And then I studied the Myka algorithms a bit more carefully. Behold:

This is using round( (pi*pX)*(pY)*.0025) % 2==0, producing the same pattern as this Myka square.

But here we use 2500 unique 4x4 pixel images to iteratively construct the same pattern:


This is the core image that was used to create the above spiral:


This is not to say we simple overlay the image into the positive shape of the spiral. The core image is "ripped" into small square pieces, and a list of these images is referenced in as we step around the center point. The result is a color palette borrowed from the image.

Distilling the Lake Water


round( (pi*pX)*(pY)*(distillNumber(pInt)*.00025))%2==0


Pulling back on the stick we fly higher. This is at altitude .0000025 where round( (pi*pX)*(pY)*(distillNumber(pInt)*.0000025))%2==0



Higher:
round( (pi*pX)*(pY)*(distillNumber(pInt)*.00000025))%2==0


And yet higher still. Using .000000025 is absolutely rediculous, but it works.
round( (pi*pX)*(pY)*(distillNumber(pInt)*.000000025))%2==0

It appears to be a recursive fractal image, for the same pattern is re-emerging as we go deeper into the mathematical abyss.

A curious blend of pi and e...
round( ((pi*e)*pX)*(pY)*(distillNumber(pInt)* (sin(pInt)*.000000025) ))%2==0


round( (pX*pY)* pow(sqrt(pInt)/e, 1.2)*.0000025 )%3==0


Lord have mercy.
round( (pX*pY)* pow(sqrt(pInt)/e, 1.2)*.00000025 )%2==0


round( (pX*pY)* pow(sqrt(pInt)/e, 1.2)*.000000025 )%2==0


round( (pX*pY)* pow(sqrt(pInt)/e, 1.2)*.0000000125 )%2==0


round( (pX*pY)* pow(sqrt(pInt)/pi, 1.23)*.000000125 )%5==0


The Aboriginal Series


round( (pX*pY)* pow(sqrt(pInt)/pi, 1.23456789)*.000123456789 )%5==0


round( (pX*pY)* pow(sqrt(pInt)/pi, 1.23456789)*.0000123456789 )%5==0



round( (pX*pY)* pow(sqrt(pInt)/pi, 1.23456789)*.00005 )%3==0

Colorized version:


I'm pretty sure this overall pattern is a map of the universe, reality, and everything.

round( (pX*pY)* pow( sqrt(pInt), 1.23456789)*.00005 )%3==0

Thursday, October 30, 2008

Image-Based Spiral Incantations

Exchange Building, Seattle, Washington.


The goldfinch was placed dynamically by the Python script. You can see that some of the tiles overlay the bird. The tiles are composed of a Letraset sheet for Helvetica and were dynamically ripped into 40 pixel squares before being rearranged using the Ulam algorithm.


This is basically a brand new alphabet for crazy people. Here you go. It is my gift to the world.




Feeling strange?


Strange chains...




Typography and Pop Art



I love typography. It seems a natural thing to combine the beautiful Persian rug spiral with type. In the image above, a small letter "a" set in Helvetica Bold Condensed is substituted for each number.
[click images to enlarge]


Same idea, only with xes.

Where to go from here? The natural progression is obvious and swift. Behold:

Make sure you click open that puppy and count how many "full Marilyns" you see. I count 3 in the current image. Of course, the number of full Marilyns will increase as the perimeter of the spiral increases. It is a simple calculation. But the simple man will only require her lips, for these are enough to tell the entire story.

I guess I should stop now. It's not likely to get any better than this.

Wednesday, October 29, 2008

"Classic" 2d Spirals


[The Squirrel]

Well, hey, getting an algorithm to generate the Manhattan skyline with 1 billion red balloons floating overhead like some nightmarish Macy's parade is certainly fun, and a splendid way to waste away a Friday night. But I prefer the basic red-on-black, 2d, no bullshit Sunday-school algorithms. To generate your own squirrel, use this here (Python) code when you test each number:

#global
fooCounter = 1

def testNumber(pInt):
    global fooCounter

    if round( (sqrt(pInt)/pi)+log(fooCounter) )%2 == distillNumber(pInt):
      fooCounter += 1
    return true
  return false


And if you forgot (or still care) what distillNumber does, here it is:

"""
recursive function for boiling down multi-digit ints into single digit ints
"""
def distillNumber(rawNumber):
    distilledNumber = 0

    tmpList = split_len(str(rawNumber))

    for k in range (len(tmpList)):
        distilledNumber = distilledNumber + int(tmpList[k])

    if len(str(distilledNumber))>1:
        distilledNumber = distillNumber(distilledNumber)

    return distilledNumber


def split_len(seq):
    return [seq[i:i+1] for i in range(0, len(seq), 1)]


Let's see what happens when we test for round( (sqrt(pInt)/pi)+fooCounter )%2 == 0...


..or, swap out pi with e round( (sqrt(pInt)/e)+fooCounter )%2 == 0


Now if you kids have been following along at home you know that the goal of all this is to create the ultimate Persian rug design. That's it. I think we've already established said design, but this one isn't too bad. It's quite simply
round( (sqrt(pInt)/e)+ pow(cos(fooCounter),2) )%distillNumber(pInt) == 0 or round( (sqrt(pInt)/e)+ pow(cos(fooCounter),3) )%distillNumber(pInt) == 0
Yes! That's really all there is to it!


Check out those dangly fish-hooky spiral bits. It is the metamorphosis!!!

round( (sqrt(pInt)/e)+ pow(cos(fooCounter),2) )%distillNumber(pInt) == 0 or round( (sqrt(pInt)/pi)+ pow(cos(fooCounter),2) )%distillNumber(pInt) == 0



Now if you're a Persian rug kind of guy, you know, and you're looking to expand beyond the run of the mill patterns that have been standard for thousands of years, look no further. Let's work together and hot rod your loom. You could be doing something like this:

Notice how almost all letters of the Thai alphabet are presented. It's just eerie. อักษรไทย อักษรไทย อักษรไทย

#thai alphabet
round( (sqrt(pInt)/pi)+ pow(sin(fooCounter),2) )%distillNumber(pInt) == 0


Here's another simple method to mess things up good:

def modifyCoordPoint(pNum):
    return pNum + cos(pNum)

You call that from the main algorithm after you've set up your new X/Y positions. Pass in X or Y accordingly.


A lovely variation of this is accomplished by introducing our little circular friend:

def modifyCoordPoint(pNum):
    return pNum + (cos(pNum)*pi)

Thursday, October 23, 2008

3D Spiral Interpretations Via Pointed Hat Operator

For these images we're testing each number with:

if round(pInt/pi)%2==0^pInt%5==true:
return true


...and the space between dots is determined by:
distillNumber(pInt)*pow(sin(pInt),9)*pi

Red Light District As Seen From Above







distillNumber(pInt)*pow(sin(pInt),5)*pi



Red Nimbus:




Red Balloons Over Manhattan


Spacer: (sin(pInt)*100) + distillNumber(pInt)/pi