Yingyang Zhou-LookingOutwards-11

For week 4 looking outwards, I wrote about Ryoji Ikeda, I really appreciate his work with full of beauty of math. His work is more “sound art” than music, becuase there are a lot of visual element invovled and it needs you to “interpretate” it instead of only “listen” to it. I want to talk about another piece of his work I really like, “datamatics [prototype-ver.2.0]”.

Using pure data as a source for sound and visuals, datamatics combines abstract and mimetic presentations of matter, time and space. datamatics is the second audiovisual concert in the datamatics series. Projecting dynamic computer-generated imagery in pared down black and white with striking colour accents, the intense yet minimal graphic renderings of data progress through multiple dimensions. From 2D sequences of patterns derived from hard drive errors and studies of software code, the imagery transforms into dramatic rotating views of the universe in 3D, whilst in the final scenes four-dimensional mathematical processing opens up spectacular and seemingly infinite vistas. A powerful and hypnotic soundtrack reflects the imagery through a meticulous layering of sonic components to produce immense and apparently boundless acoustic spaces.

datamatics [ver 2.0] is the full–length version of this audiovisual concert. With a commissioned second part added, datamatics [ver.2.0] is significantly developed from the earlier version of this piece which premiered in March 2006. Driven by the primary principles of datamatics, but objectively deconstructing its original elements – sound, visuals and even source codes – this work creates a kind of meta–datamatics. Real–time program computations and data scanning are employed to create an extended new sequence that is a further abstraction of the original work. The technical dynamics of the piece, such as its extremely fast frame rates and variable bit depths, continue to challenge and explore the thresholds of our perceptions.

Victoria Reiter – Project 11 – Composition

sketch

/*
Victoria Reiter
Section B
vreiter@andrew.cmu.edu
Assignment-10-b
*/

// makes turtle
var turtle;
// angle for the pretty plant design thing!
var chooseAngle = 200;

//makes plus shape
function plus() {
        turtle.penDown();
        turtle.forward(5);
        turtle.left(90);
        turtle.forward(5);
        turtle.right(90);
        turtle.forward(5);
        turtle.right(90);
        turtle.forward(5);
        turtle.left(90);
        turtle.forward(5);
        turtle.right(90);
        turtle.forward(5);
        turtle.right(90);
        turtle.forward(5);
        turtle.left(90);
        turtle.forward(5);
        turtle.right(90);
        turtle.forward(5);
        turtle.right(90);
        turtle.forward(5);
        turtle.left(90);
        turtle.forward(5);
        turtle.right(90);
        turtle.forward(5);
}

function setup() {
    createCanvas(600, 400);
    background(80, 0, 255);
    // makes turtle at center of canvas
    turtle = makeTurtle(width / 2, height / 2);
    turtle.setColor(color(202, 255, 112, 80));
    turtle.setWeight(.25);
    turtle.penUp();    
}

function draw() {
    plus(20, 30);
    for (var i = 0; i < 100; i++) {
        var distt = mouseX / 7;
        turtle.penUp();
        turtle.forward(distt);
        plus();
        turtle.penUp();
        // returns turtle to center so it progressively moves greater distances
        turtle.back(distt);
        // rotates by golden angle
        turtle.left(chooseAngle);
    }

}


// --------------------------------
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;}

///GRACE DAY TAKEN///

For this week’s project I took inspiration from the “golden angle” and natural angles of plants and things in nature from last week. I wanted to know what it would be like if I manipulated it to work through an angle of my choosing, and other aspects of my choosing, such as a plus shape instead of hexagons. I made the stroke weight very fine and the opacity more sheer to add added effects. I also introduced animation by incorporating variation with mouseX.

I think this design is interesting because as you move the mouse, it looks as though there is a flower itself in the middle rotating around and around, but really it’s just the shapes building on themselves. How interesting!

((This is unrelated but I went to the Children’s Museum today and saw the Letter Rain mentioned in the Deliverables for the week and that wE. cOdED. so I thought that was cool! Here’s a quick picture just for fun hehehe))

Me at the Children’s Museum with the raining text about bodies!

Yingying Yan – Project 11 Composition

/*
Yingying Yan
Section E
yingyiny@andrew.cmu.edu
Project-11
*/
//make an array so i can draw more than one flower
var ttl = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];

function setup() {
    createCanvas(480, 240);
    background(0);
    frameRate(10);
    //set up the make turtle 
    for(var i = 0; i < ttl.length; i++) {
    	ttl[i] = makeTurtle(random(width), random(height));
    }
}

function draw() {
	for(var i = 0; i < ttl.length; i++) {
		ttl[i].setWeight = (random(0.1,5));
    	ttl[i].setColor = (random(150), random(200), random(255));
    	//start drawing the flowers
		ttl[i].penDown();
		var dd = 4
		ttl[i].forward (dd);
		ttl[i].right(dd);
		ttl[i].right(dd);
		ttl[i].forward(dd);
		ttl[i].left(dd)
		ttl[i].forward(dd * i);
		ttl[i].left(150);
	}


}
//restart the drawing
function mousePressed(){
	background(0)
}

//////////////////////////////////////////////////////////////
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;
}

Xiaoying Meng – Project 11 Composition

click to change colors

sketch

//Xiaoying Meng
//B
//xiaoyinm@andrew.cmu.edu
//Project 11
var myTurtle;
var R = [255,200,150,100,50,0];
var G = [255,200,150,100,50,0];
var B = [0,50,100,150,200,255];
var i=0;

function triangles(){
    for (var i = 0; i < 3; i++){
        myTurtle.penDown();
        myTurtle.forward(5);
        myTurtle.left(120);
    }
}

function setup() {
    createCanvas(480, 400);
    background(0);
}
function mousePressed(){
    //change colors
    i = i+1;
    if (i===5){
        i=0;
    }
}
function draw() {
    myTurtle = makeTurtle(480-mouseX,400-mouseY);
    myTurtle.setColor(color(R[i],G[i],B[i]));
    myTurtle.penUp();

    for (var x=0; x< 100; x++){
        myTurtle.penUp;
        //go out
        var dist = x*2;
        myTurtle.forward(dist);
        
        //draw
        triangles();

        //go back
        myTurtle.penUp();
        myTurtle.left(180);
        myTurtle.forward(dist);
        myTurtle.left(180);

        //rotate angle based on location of mouseX
        var a =180*(3-sqrt(5))-mouseX/100;
        myTurtle.left(a);
    }
}


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;}

I wanted to create something interactive with the turtles. Allowing the users to draw with them. But to add some interesting factors, I made the turtle go the opposite direction of the mouse and the “pen” rotate according to mouseX.

Katherine Hua – Project 11 – Composition

sketch

/* Katherine Hua
Section A
khua@andrew.cmu.edu
Project-11-Composition */

//global variables
var ttl1;
var ttl2;
var ttl3;
var ttl4;
var ttl5;

function setup() {
    createCanvas(480, 480);
    background(35);
    //starting positions of turtle
    ttl1 = makeTurtle(267, 302);
    ttl2 = makeTurtle(260, 280);
    ttl3 = makeTurtle(280, 407);
    ttl4 = makeTurtle(267, 277);
    ttl5 = makeTurtle(278, 360);
    strokeCap(PROJECT);
    strokeJoin(MITER);
    frameRate(1);
}

function draw() {
	//turtle 5
	ttl5.setColor('skyblue');
	ttl5.setWeight(1);
	for (var n = 0; n < 10; n ++) {
		ttl5.forward(30);
		ttl5.left(55);
		ttl5.forward(50);
		ttl5.right(15);
		if (n % 9 === 0) {
			ttl5.forward(3);
		}
	}
	//turtle 1
	ttl1.setColor('pink');
	ttl1.setWeight(1);
	for (var i = 0; i < 20; i ++) {
		ttl1.forward(70);
		ttl1.left(120);
		ttl1.forward(100);
		ttl1.right(10);
	}
	//turtle 3
	ttl3.setColor('yellow');
	ttl3.setWeight(1);
	for (var k = 0; k < 10; k ++) {
		ttl3.forward(50);
		ttl3.left(55);
		ttl3.forward(60);
		ttl3.right(15);
		if (k % 9 === 0) {
			ttl3.forward(5);
		}
	}	
	// turtle 4
	ttl4.setColor('orange', 20);
	ttl4.setWeight(1);
	for (var m = 0; m < 10; m ++) {
		ttl4.forward(20);
		ttl4.left(110);
		ttl4.forward(50);
		ttl4.right(15);
		}
	//turtle 2
	ttl2.setColor('skyblue');
	ttl2.setWeight(1);
	for (var j = 0; j < 10; j ++) {
		ttl2.forward(1);
		ttl2.left(55);
		ttl2.forward(10);
		ttl2.right(15);
		if (j % 9 === 0) {
			ttl2.forward(5);
		}
	}

}

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;}

At first I wanted to create a sunflower through this, but in the end I got carried away and began adding more and more layers to the design.

what it looks like at frame 1
what it looks like at frame 2

Yingyang Zhou-Project-11-Composition

click to plant trees!

//Yingyang Zhou
//yingyanz@andrew.cmu.edu
//Project 11
//section A


var turtle;

var treeX = 300;
var treeY = 400;

function setup() {
    createCanvas(600, 400);
    background(224, 216, 208);

    frameRate(1);
}

function draw(){
    turtle = makeTurtle(treeX, treeY);
    turtle.setColor(color(84, 60, 43));
    turtle.setWeight(7);
    turtle.penUp();

    var trunkRandomDegree = random(5);
  	var trunkRandomHeight = random(minTrunk,maxTrunk);
    turtle.penDown();
    turtle.left(90+trunkRandomDegree);
  	turtle.forward(trunkRandomHeight);
  	turtle.right(90+trunkRandomDegree);
  	turtle.penUp();
  	noLoop();

  	turtle.setColor(color(119, 166+random(-20,20), 119));
  	branch(turtle, floor(random(1, 5)), 10, 3, random(5), random(5));

}
var height = 400;
var minTrunk = height/4;
var maxTrunk = height/3;
var minBranch = height/10;
var maxBranch = height/3;
var minDegree = 3;
var maxDegree = 45;


function branch(turtle, number, length, width, left, right){
  var number = floor(random(1, 5));
  var length = 7;
  var width = 0.5;
  for(var i = 0; i < number; i++){
  		turtle.penDown();
  		turtle.left(90+random(minDegree,maxDegree));
  		turtle.forward(length);
  		branch(turtle, number/i, length, width, random(5), random(5));
  		length = length/i;
  		width = width/i;

  }

  turtle.penDown();

  turtle.left(90+trunkRandomDegree);
  turtle.forward(-trunkRandomHeight/2);
  turtle.penDown();
  turtle.left(random(minDegree))

  turtle.left(random(minDegree,maxDegree));
  turtle.forward();
  for(var i = 0; i < 6; i++){
    turtle.penDown();
    turtle.forward(5);
    turtle.right(60);
  }
  turtle.penUp();
}

function mousePressed(){
	treeX = mouseX;
	treeY = mouseY;
	// setup();
	draw();
}



///////////////////////////////////////////////////////////////////////
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;}

I enjoyed doing this project and the randomness turned out a little surprising but I like it! The idea is when you click on the canvas, there would be a tree grow from where you clicked.

Robert Oh- Looking Outwards- 11

Caption: “Star Wars- Imperial March on Eight Floppy Drives”

For this week’s looking outwards post, I decided to talk about this interesting YouTube video made by user MrSolidSnake745 (whose YouTube channel contains other technology-based music). I really admire this project because the whole set-up is very unique. Using 8 different floppy drives to alternate between tones and pitches to create a universally famous theme is a cool idea!

I have no idea how the creator actually got to create this music, but if I had to guess, the creator probably set up each individual floppy drive to play a certain tone and timed each floppy drive perfectly to play the “Imperial March” theme perfectly. All in all, I thought this was a very cool project!

Xiaoying Meng -Looking Outwards 11

I think this is a very interesting project using computational music. The project is called, Weather Thingy – Real time climate sound controller. This project is created by Adrien Kaeser at ECAL (Media and Interaction Design Unit).  Weather Thingy is a sound controller using real-time weather data to modify settings of music instruments. The controller has three weather sensors including a rain gauge, a wind vane, and an anemometer. The device translates weather data to data that musical instruments can use to generate sound. I really appreciate this project because it still allows the musicians to use their creativity since musicians can use the controllers to change the melody in real-time. It creates more potential for music creation, really focuses on the presence and capturing the moments. I guess the algorithm needs to turn the collected weather condition into data, then turn those data into music notes. There must be a system that links the two logically.

 

 

Romi Jin – Project-11-Composition

sketch

/*
Romi Jin
Section B
rsjin@andrew.cmu.edu
Project-11
*/


function setup() {

    createCanvas(480, 480);
    background("black");

}

function draw() {

    var myTurtle = makeTurtle(width/2, height/2);
    myTurtle.penDown();
    myTurtle.setColor("white");
    myTurtle.setWeight(0.05);
    strokeJoin(MITER);
    strokeCap(PROJECT);
    var step = 1; //different patterns

    for (i = 0; i <= 150; i++) { 

        //flower drawing
        myTurtle.forward(step);
        myTurtle.left(step);
        myTurtle.forward(step);
        myTurtle.left(step);
        myTurtle.forward(step);
        myTurtle.left(step);
        myTurtle.forward(step);
        myTurtle.left(step);

        //angle
        myTurtle.right(200);
        //spacing
        myTurtle.forward(i*3);
    }

}


/////////////////////////////////////////////////////////////

//turtle code

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 this project, I decided to play around with angles and lines and see what kind of shapes I could make with different patterns and sizing. I eventually ended up with a flower / pinwheel, drawn spiraling out to a certain angle. It was interesting to see the difference between using turtle graphics to draw this versus not using it.

Jessica Timczyk – Project 11

sketch

// Jessica Timczyk
// Section D
// jtimczyk@andrew.cmu.edu
// Project-

var turtle 

function setup() {
    createCanvas(480, 480);
    background(0);

    frameRate(10);
}


function draw() { 
    turtle = makeTurtle(mouseX, mouseY); // make turtle variables
    angle = turtle.angleTo(mouseX, mouseY);
    turtle.right(angle);
    turtle.forward(40);

   
    turtle.setWeight(6) // setting the specifications for the turtles lines
    strokeJoin(MITER);
    strokeCap(PROJECT);
    turtle.setColor(random(255)); //random colors

   
      turtle.penDown(); // make swirl shape
        turtle.forward(3);
        turtle.left(90);
        turtle.forward(50);
        turtle.right(90);
        turtle.forward(50);
        turtle.right(90);
        turtle.forward(37.5);
        turtle.right(90);
        turtle.forward(25);
        turtle.right(90);
        turtle.forward(12.5);
        turtle.right(90);
        turtle.forward(12.5);
        turtle.left(90);
        turtle.forward(12.5);
        turtle.left(90);
        turtle.forward(25);
        turtle.left(90);
        turtle.forward(37.5);
        turtle.left(90);
        turtle.forward(47);
        turtle.goto(mouseX,mouseY);



}

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;
}

I really enjoyed doing this project. I had originally intended for the swirls to make a continuous line across the screen but after multiple tries I couldn’t seem to get them to follow each other. I think using turtle to create visuals is very fun and makes it a lot easier because it allows me to create individual shapes and patterns, like these swirls that can be moved all together without having to individually put in each value. next time I would like to try to figure out to create these patterns but have them be all connected with each other in a nice line.