/* Rani Randell
rrandell@andrew.cmu.edu
Section A
Project 11 */
function setup() {
createCanvas(400, 400);
background(255, 250, 0);
}
function draw() {
var ttl = makeTurtle(160, 430);
ttl.penDown();
ttl.setColor(255);
var i;
var d;
for(i=0; i<200;i++){ //makes outmost giant circle
d=16
ttl.forward(d);
ttl.left(360/100);
}
ttl.penUp();
ttl.left(90)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 5;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.right(90)
ttl.forward(40);
ttl.penDown();
for(var k = 0; k<100; k++){
var q = 10;
ttl.forward(q);
ttl.left(360/100)
}
ttl.penUp();
ttl.right(90)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 6;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp(); //start playing here
ttl.left(70)
ttl.forward(-40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(90)
ttl.forward(80);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 13;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.forward(50);
ttl.right(80);
ttl.forward(240);
ttl.penDown();
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp(); //
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(70)
ttl.forward(40);
ttl.penDown();
for(var j = 0; j<100; j++){
var r = 8;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(100);
ttl.forward(30);
ttl.right(10);
ttl.forward(20);
ttl.penDown();
for(var t = 0; t<100; t++){
var r = 3;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(100);
ttl.forward(30);
ttl.right(10);
ttl.forward(20);
ttl.penDown();
for(var t = 0; t<100; t++){
var r = 3;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(100);
ttl.forward(30);
ttl.right(10);
ttl.forward(20);
ttl.penDown();
for(var t = 0; t<100; t++){
var r = 3;
ttl.forward(r);
ttl.left(360/100)
}
ttl.penUp();
ttl.left(100);
ttl.forward(30);
ttl.right(10);
ttl.forward(20);
ttl.penDown();
for(var t = 0; t<100; t++){
var r = 3;
ttl.forward(r);
ttl.left(360/100)
}
}
//turtle code template
function turtleLeft(d){this.angle-=d;}
function turtleRight(d){this.angle+=d;}
function turtleForward(p){var rad=radians(this.angle);var newx=this.x+cos(rad)*p;
var newy=this.y+sin(rad)*p;this.goto(newx,newy);}
function turtleBack(p){
this.forward(-p);}
function turtlePenDown(){this.penIsDown=true;}
function turtlePenUp(){this.penIsDown = false;}
function turtleGoTo(x,y){
if(this.penIsDown){stroke(this.color);strokeWeight(this.weight);
line(this.x,this.y,x,y);}this.x = x;this.y = y;}
function turtleDistTo(x,y){
return sqrt(sq(this.x-x)+sq(this.y-y));}
function turtleAngleTo(x,y){
var absAngle=degrees(atan2(y-this.y,x-this.x));
var angle=((absAngle-this.angle)+360)%360.0;return angle;}
function turtleTurnToward(x,y,d){var angle = this.angleTo(x,y);if(angle< 180){
this.angle+=d;}else{this.angle-=d;}}
function turtleSetColor(c){this.color=c;}
function turtleSetWeight(w){this.weight=w;}
function turtleFace(angle){
this.angle = angle;}
function makeTurtle(tx,ty){var turtle={x:tx,y:ty,
angle:0.0,penIsDown:true,color:color(128),weight:1,left:turtleLeft,
right:turtleRight,forward:turtleForward, back:turtleBack,penDown:turtlePenDown,
penUp:turtlePenUp,goto:turtleGoTo, angleto:turtleAngleTo,
turnToward:turtleTurnToward,distanceTo:turtleDistTo, angleTo:turtleAngleTo,
setColor:turtleSetColor, setWeight:turtleSetWeight,face:turtleFace};
return turtle;}
For my project I was really inspired by Tomas Saraceno’s large scale installation work Webs of Tension. This work is a vast room of giant cubes made of iron bars on each cube edge. But within the open air cube are thousands of spiderwebs, made to show the vast interconnectivity that they use daily and we admire but isn’t constructed for only human purposes. Underneath the cubes are giant lights that illuminate the thousands of imperfect yet beautiful webs. When I saw this it really spoke to me so I felt I could try to recreate that with turtle graphics. Below is a link to his website:
https://studiotomassaraceno.org/