Something Self-Similar ….

I named my home-studio “Self-Similarity Studios” because I’ve always had an affinity for things in science and nature that affect this quality. “AS ABOVE …. SO BELOW” Think about a rock. Hold it in your hand…what color is it? What shape does it have? Note that the rock you are holding and a mountain (or significantly large hill) MAY look alike….just on different scales. Two inches of a shoreline, viewed from above, with a few hundred bits of sand – MAY look like … two MILES of shoreline from 100 stories above, with a few hundred large rocks. Rocks, mountains, trees, shells, coastlines….they all exhibit a self-similarity. This is where nature and artificiality intersect and dove-tail in strange and striking ways. (More images, experiments and abstraction forthcoming)

I briefly had access to tools that could render graphics quickly (and cost-free) – this was the Silicon Graphics Lab at Cal Poly, donated by SGI, the lab ran about 30 workstations, each running SPARC SOLARIS 7 and all wired into a mainframe capable of doing the massive amounts of calculations needed to draw a frame (or a million, as in a feature-length CGI-animated motion picture) required to not only calculate and store (print; if need be) but depict images that elicit pure aesthetic beauty.

Ahhh….where Logic and Art intersect. On the chipset just beneath my fingers and the never-ending-thought-machine hard-wired to my skull and backbone.

To me; numbers are a simple, spiritual truth. People use numbers to lie all the time; but one can NEVER be deprived of its “one-ness” Carl Sagan said, “The simplest thought like the concept of the number one; is an elaborate logical underpinning. The brain has it’s own language for testing the elegance and consistency of the world.” One is one. QED.
If WWWIII begins at dawn; two will be a prime number. If x is an odd integer, then x + 2 will also be odd. The square root of 2 will be irrational; The sum of The Cantor Set DsubH will be transcendental. Our universe could be obliterated in an instant, but there will still be five and only five regular solids.*
I don’t know about you but I take comfort in that.

Anyway….I had access to this lab for a year; these machines, combined, would still (many years later) dwarf the computing power of yours or my CPU. These machines were used for Raytracing; most famously 1st used in entertainment/(Art!) by John Laseter; the Academy Award winning producer of the short “Luxo Jr.” (and founder of PIXAR).

a frame from luxo jr
How real does this frame look TO YOU?

Luxo is just a lamp, but it took parallel processors days to make him look up, or turn, or jump. Why? – A raytraced image is a 3D scene (Picture the two lamps)….There is ambient and natural light reflected off them, they also project their own artificial light. That’s a lot of photons bouncing around a simple scene – to make it look real; Laseter perfected a technique whereby:
FOR (EVERY PIXEL ON THE SCREEN)
DO (~a million calculations to determine it’s color in RGB Space)
….or a few billion for one frame
….or difficult-to-express numbers for a 3-min short film.

I never got to build or try a ray-tracer…they took about an hour to render just one frame. Till recently a complete developer environment was required to render computer graphics —Visual Studio, a UNIX lab, Something big and expensive from Microsoft, SGI, Sun — all in my interest faded when I didn’t have access to the tools; I never really got the chance to explore it–I STILL have unsolved problems from back then. Only now can an affordable computer be had, open-source IDE’s set up, and LOGIC be used to make art: Fast and CHEAP.

The featured picture was created using the Processing java template library. If you have the JDK (see column two) you can build things like this yourself.

Here is the SRC (Source Code) It uses (to me) the complex compsci-concept of recursion; whereby by a function (in this case a procedure) calls itself. It will render a slightly different image every-time it runs and is easily customize-able; I hope you enjoy it as much as I enjoyed designing the algorithm
/*Algorithm by cwelke @Tapper7.com for Self-Similarity Studios
Last stable build: using Processing API, JDK 1.8, win8.1 5/26/15
Dist under The GNU Public License - compliant with ANSI/ISO std.*/
void setup(){
size(1000, 700);
background(#0F1A0A);
noStroke();
float dec = 0.6;
selfS(width*dec, height*dec, 400);
}//end setup
void selfS(float x, float y, float sz){
float angle, nx, ny;
//last int is transparency--rand switches tint
fill(lerpColor (#002900, #006600, random(1)), 300);
ellipse(x, y, sz, sz);
float rec = 0.6;
if(sz > 1){//recurse to base::do(while px_sz > 1)
angle = random(TWO_PI);
nx = x + sz*rec * sin(angle);
ny = y + sz*rec * cos(angle);
selfS(nx, ny, sz*rec);
angle = random(TWO_PI);
nx = x + sz*rec * sin(angle);
ny = y + sz*rec * cos(angle);
selfS(nx, ny, sz*rec);
angle = random(TWO_PI);
nx = x + sz*rec * sin(angle);
ny = y + sz*rec * cos(angle);
selfS(nx, ny, sz*rec);
}//endIF
}//end selfS

Here is the program run a second time:

only three parameter changes - colors & size
Run again with three parameter changes – colors & size

As long as we are at it check this out:

a recursive forest snap 1
Real…or Artificial?

Same logic – run a second time:

tree snap 2
Algorithmus Eleganten

The source:
/*orig. src by Zack Marlow-McCarthy*/
//modified, formatted, built, debugged and run by Tapper @Tapper7.com
//last stable build at SSStudios 5/27/15
//Processing API builds on JDK 1.8 running win8.1
//rights+compliance: ANSI/ISO std style, Creative Commons & The GNU Public License
float angleRandom1 = .8;
float angleRandom2 = 1/angleRandom1;
float lengthRandom1 = 1.01;
float lengthRandom2 = .08;
void setup(){
size(800,640);
//blue mist mod 5/27
background(#B2B2FF);
smooth();
}
void draw(){
translate(width/2,height);
rotate(PI);
strokeWeight(0);
if(mousePressed == true){
fill(126,20);
rect(-width/2,0,width,height);
strokeWeight(1);
pushMatrix();
translate(random(-width/2,width/2),0);
rotate(random(-PI/9,PI/9));
branch(30,PI/2, 0,0);
popMatrix();
}
}
void branch(float branchLength,float angle,float startX,float startY){
if(branchLength<1){//base case fill(#004A00); noStroke(); ellipse(startX,startY,5,10); stroke(0); }else{ float randomNess = random(0,100); strokeWeight(branchLength/2); float endX = cos(angle)*branchLength; float endY = sin(angle)*branchLength; line(startX,startY,startX+endX,startY+endY); startX += endX; startY += endY; if(randomNess>0 && randomNess<90){ branch(branchLength/(random(lengthRandom1,lengthRandom1+lengthRandom2)), angle*random(angleRandom1, angleRandom2), startX,startY); }else if(randomNess>=90 && randomNess<94){ branch(branchLength/(random(lengthRandom1,lengthRandom1+lengthRandom2)), angle*random(angleRandom1, angleRandom2),startX,startY); branch(branchLength/(random(lengthRandom1,lengthRandom1+lengthRandom2)), angle*random(angleRandom1, angleRandom2),startX,startY); }else if(randomNess>=94 && randomNess<98){
branch(branchLength/(random(lengthRandom1,lengthRandom1+lengthRandom2)), angle*random(angleRandom1, angleRandom2),startX,startY);
branch(branchLength/(random(lengthRandom1,lengthRandom1+lengthRandom2)), angle*random(angleRandom1, angleRandom2),startX,startY);
branch(branchLength/(random(lengthRandom1,lengthRandom1+lengthRandom2)), angle*random(angleRandom1, angleRandom2),startX,startY);
}else{
branch(branchLength,angle,startX,startY);
}//end else
}//end if
}//end recursion

*Proofs to come….[] -t

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.