Project 11 – Turtle Freestyle – John Legelis

sketch

// John Legelis
// Section D


var t // turtle
var yF = 273// Winning Y value
var w // State of play (Play, Win, or Lose)
var s // osilator incriment

//load background image
function preload() {
    maze = loadImage("https://i.imgur.com/OPGsUjg.png")
}

function setup() {
    createCanvas(400, 300);
    background(0);
    image(maze,0,0)
    
    fill(0,255,0)
    noStroke()
    rectMode(CORNER)
    rect(361, yF, 33,10)

    // initialize t
    t = makeTurtle(20,0)
    t.setWeight(4)
    mouseX = 20
    mouseY = 1 
    s = 0
    w = 0
    yF = 263
}

function draw() {
    //Oscilate between colors at winning and loosing screens
    s = s + 1
    if (s % 3 == 1){
        var lcol = [255,255,255]
        var wcol = [0,255,0]
    }
    else {
        var lcol = [255,0,0]
        var wcol = [255,255,255]
    }

    // retrive brightness at turtle location
    var p = maze.get(t.x, t.y)
    var Tbright = brightness(p)
    // If in "play" mode, move turtle towards the mouse
    if (w == 0) {
        theta = t.angleTo(mouseX, mouseY)
        t.right(theta)
        t.forward(1)
    }


    //if hit wall, lost
    if (Tbright < 100){
        w = -1
    }
    // if below "win line", won
    if (t.y > yF) {
        w = 1
    }
   
    // if lost...
    if (w == -1){
        background(lcol)
        stroke(255)
        textSize(50)
        text("G A M E O V E R", 10, 150)
        textSize(25)
        text("mouse in box to restart", 40, 30)
        noStroke()
        fill(0)
        rectMode(CENTER)
        rect(25,25, 10,10)
    }
    //if won...
    if (w == 1){
        background(wcol)
        stroke(255)
        textSize(50)
        text("! Y O U W O N !", 10, 150)
        stroke(255)
        textSize(25)
        text("mouse in box to restart", 40, 30)
        noStroke()
        fill(0)
        rectMode(CENTER)
        rect(25,25, 10,10)
    }

    //If lost or won and mouse is in box initialize and go back to "play" mode
    if (((w==-1) || w==1) & (mouseX > 25 - 10) && (mouseX < 25 + 10) && 
    (mouseY > 25 - 10) && (mouseY < 25 + 10)) {
        w = 0
        setup()
    }

    if (mouseIsPressed){
        w = 1
    }
}


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

When approaching this project I had an idea instantly to use the turtle to make some sort of maze game. Given our recent experience in using brightness and get image I was able to analyze a maze image and detect the walls very efficiently. I polished the game with a win and lose screen and a quick restart function based on mouse position.

Hannah Cai—Project 11—Composition

click to generate a new tree!

/* Hannah Cai
Section C
hycai@andrew.cmu.edu
Project-11-Composition
*/

//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(0),
                  weight: strokeWeight(w),
                  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;
}

/////my code

var angle;
var x;
var y;
var w = 5;
var minAngle = 1;
var maxAngle = 30;
var minRatio = .6;
var maxRatio = .9;

function setup() {
    createCanvas(480, 480);
    background(250);
    strokeJoin(MITER);
    strokeCap(PROJECT);
    frameRate(1);
}

function tree(length, turtle, w, r, l) {
  if (length > 10) { //create recursive branches
    ratio = random(minRatio, maxRatio)
    turtle.forward(length);
    turtle.setWeight(w * ratio)
    turtle.right(r);
    tree(length * ratio, turtle, w*ratio, random(minAngle,maxAngle), random(minAngle, maxAngle));
    turtle.left(r+l);
    tree(length * ratio, turtle, w*ratio, random(minAngle, maxAngle), random(minAngle, maxAngle));
    turtle.right(l);
    turtle.setWeight(w / ratio)
    turtle.back(length);
  } else { //draw flowers!
    turtle.setColor("Pink");
    turtle.setWeight(10);
    turtle.forward(10);
    turtle.setColor(0);
    turtle.setWeight(w);
    turtle.back(10);
  }
  noLoop();
}

function draw() {
    var turtle = makeTurtle(width / 2, height);
    //trunk
    turtle.penDown();
    turtle.right(270);
    turtle.forward(length);
    //branches
    tree(100, turtle, w, random(minAngle,maxAngle), random(minAngle,maxAngle))
}

//refresh the canvas when mouse is clicked
function mouseClicked() {
  setup();
  draw();
}

For this project, I was inspired by recursive trees, and I wanted to see if I could make one with turtle. Although it took a long time to figure out, I’m really proud of the end result! In the future, I’d want to try and animate the tree or make it interactive, although it might turn out to be too computationally expensive. Overall, I feel like I learned a lot about turtles and recursive functions, and I had a lot of fun!

Joanne Lee – Looking Outward 11

Alan Walker’s 2015 hit single, ‘Faded’.

When I realized this week’s theme was computational music, I immediately thought of Alan Walker specifically. He is a music producer and he creates his music (EDM type of music) using a computer program that allows him to combine synthetic instruments and sounds. He is also able to edit the sound waves in the program to tweak it any which way he wants and add effects such as echo or reverb to name a few. The song that I chose specifically is ‘Faded’ which is one of his most popular songs. When I first came across this song, it really piqued my interest in computer music and I actually felt motivated to learn about computer music.

Walker obviously begins with an artistic vision and then he tinkers with the program to make sure every beat and sound is placed exactly where he wants it to be. Provided below is a video of one of this studio sessions and he has other studio sessions on his channel. I am thankful to live in a generation where computer music allows someone to create music with all sorts of synthetic instruments on their own from the comforts of their own home / studio!

 

Alan Walker in his studio session for ‘Faded’, showing snippets of the thought process behind his hit song.

Project-11 Composition-Veronica

sketch

//Veronica Wang
//Section B
//yiruiw@andrew.cmu.edu
//Project-11

var turtle = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; 
var angle = 0; //current direction turtle is facing
var turnangle = 5; //turn angle
var incre = 0.1; //speed increment
var counter = 0; //how many times turtle had completed a full geometry

function setup() {
    createCanvas(480, 300);
    background(0);
    frameRate(10);

    //create array of turtles
    for (var i = 0; i < turtle.length; i++) {
       turtle[i] = makeTurtle(random(0, width), random(0, height), random(1, 3));
       turtle[i].setColor(color(random(255), random(255), random(255), 60));
    };
}

function draw() {
  //draw turtles
  for (var i = 0; i < turtle.length; i++) {
    turtle[i].penDown();
    turtle[i].setWeight(5);
    //change turtle direction after 100 instances
    if (counter < 100){
      if(angle < 0 || angle > 90){
            turnangle *= -5;
        }
      angle += turnangle;
      turtle[i].forward(1);
      turtle[i].right(turnangle);
      turtle[i].speed += incre;
      counter += 1;
    }
    turtle[i].speed += 0.5;
    turtle[i].forward(2);
    turtle[i].right(turnangle);
  }
    
}

function mousePressed(){
    turtle.push(makeTurtle(mouseX, mouseY, random(1, 3)))
    turtle[turtle.length - 1].setColor(color(random(255), random(100), random(255), 60));
    
}



//------------------------------------------------------------------------------------  


function turtleLeft(d) {
    this.angle -= d;
}

function turtleRight(d) {
    this.angle += d;
}

function turtleForward() {
    var rad = radians(this.angle);
    var newx = this.x + cos(rad) * this.speed;
    var newy = this.y + sin(rad) * this.speed;
    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) {
    var angle = this.angleTo(x, y);
    if (angle < 180) {
        this.angle += speed;
    } else {
        this.angle -= speed;
    }
}

function turtleSetColor(c) {
    this.color = c;
}

function turtleSetWeight(w) {
    this.weight = w;
}

function turtleFace(angle) {
    this.angle = angle;
}

function makeTurtle(tx, ty, vel) {
    var turtle = {x: tx, y: ty,
                  angle: 0.0, 
                  penIsDown: true,
                  color: color(128),
                  weight: 1,
                  speed: vel,
                  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;
}

In this project I wanted to make a somewhat random drawing machine that generates geometry based on rotation and random population. I liked the aggregation of triangles in this iteration and how the rotation made them look more circular/gear like.

Beginning stage 
More complex stage
Complex/chaotic stage

Austin Treu – Project 11

atreu-proj-11

/*Austin Treu
  atreu@andrew.cmu.edu
  Section B
  Project 11*/

var turt, mouseTurt, colCount = 0, revTurt, uLine = false,
    colArr = ['purple','orange','blue','yellow','green','red','pink'];

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

    //display title
    textSize(48);
    fill("green")
    textAlign(CENTER);
    text("Turtle Draw!", width/2, 50);
    textSize(15);
    text('Click to draw, Press Space to clear,', width/2, 80);
    text('Press Enter to change color', width/2, 95);


    //make turtles
    turt = makeTurtle(width/4, 60);
    turtL = makeTurtle(0,0);
    turtR = makeTurtle(width,height);
    turtT = makeTurtle(width,0);
    turtB = makeTurtle(0,height);
    mouseTurt = makeTurtle(0,0);
    revTurt = makeTurtle(width, height);
}

function draw() {
    //turtle to draw underline/outline
    if(!uLine){
        turt.penDown();
        turt.setColor('blue');
        turt.setWeight(10);
        if(turt.x < 3*width/4)
            turt.forward(2);
        else
            uLine = true;
    }

    //turtle corresponding with mouse pos
    if(mouseIsPressed){
        mouseTurt.penDown();
        revTurt.penDown();
    }
    else{
        mouseTurt.penUp();
        revTurt.penUp();
    }
    mouseTurt.setWeight(5);
    mouseTurt.goto(mouseX, mouseY);
    var ind = colCount%colArr.length;
    mouseTurt.setColor(colArr[ind]);

    revTurt.setWeight(5);
    revTurt.goto(width-mouseX, mouseY);
    var ind = colCount%colArr.length;
    revTurt.setColor(colArr[ind]);

    keyPressed();
}

function keyPressed(){
    //reset the screen 
    if(keyCode === 32){
        background(255);
        //display title
        textSize(48);
        fill("green")
        noStroke();
        textAlign(CENTER);
        text("Turtle Draw!", width/2, 50);
        uLine = false;
        turt.goto(width/4,60)
    }

    //cycle colors
    if(keyCode === 13)
        colCount++;

    keyCode = -1;
}

//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 setColor(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: setColor, setWeight: turtleSetWeight,
                  face: turtleFace};
    return turtle;
}

I didn’t quite have an idea for what to do with this project at first, so I just started experimenting with the turtles and the mouse. Ultimately, I thought this was a pretty solid design that was fun to use.

Han Yu Project 11 Composition

click on Canvas to make spirals!

sketch

// Han Yu
// Section D
// hyu1@andrew.cmu.edu
// Project 11 Compostion

var ttl;

function setup() {
    createCanvas(400, 400);
    background(255, 200, 200);
    ttl = makeTurtle(width/2, height/2);
    ttl.setColor(255);
    ttl.setWeight(2);
    ttl.penDown();
    frameRate(50);
}

function draw() {
	var step = (frameCount/150);
	ttl.forward(step);
	ttl.left(5);
}

function mousePressed() {
	ttl = makeTurtle(mouseX, mouseY);
	var c = [255, 'purple', 255, 155]; //maximize the chances of getting a white stroke
	ttl.setColor(c[floor(random(0,4))]);
	ttl.setWeight((random(0,2)));

}

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

Spirals are my favorite patterns so I wanted to make my project with them. It was fun making variations in color and stroke but setting the steps for spirals are hard. Overall, doing this project has definitely made me more familiarized with turtles.

Screenshot of project.

Sophie Chen – Looking Outwards 11

Laetitia Sonami

Laetitia Sonami is a sound artist, performer, and composer of interactive electronic music based in San Francisco. What initially drew my attention is “The Lady’s Glove”, an instrument she developed herself, which triggers and manipulates sound in live performance. This instrument is worn on her right hand, and is a black glove made of mesh integrated with a lot of different sensors such as micro-switches, pressure pads, ultrasonic receivers, and light sensors, just to name a few. The signals the glove receive are connected to a hardware named Sensorlab, which is then mapped onto MAX MSP running on a computer, which connects it to pre-stored sounds.

Sonami performing in her glove instrument

Sonami said that through creating this instrument, she was trying to figure out at which point does a controller become an instrument. I found what she said to be very insightful and thought provoking, especially applicable today when there are so many tools around us that we can just use to generate things without even putting much thought into it. Sonami concludes that when a software starts adapting to the controller, it becomes more of a symbiosis between the controller, the code, and the software. I think her glove does successfully embody that and qualify as an instrument, not just a controller/generator.

(jump to 10:34 for Sonami performing with the glove)

JasonZhu_Project-11-Composition

sketch

/* Jason Zhu
Section E
jlzhu@andrew.cmu.edu
Project 11
*/

var bigturtle;

function setup() {
    createCanvas(450, 450);
    // set color variables for background
    var cx = constrain(mouseX, 0, 480);
	var cy = constrain(mouseY, 0, 480);
	var red = cx * .3
	var green = cy * .3
	var blue = 100
    background(red * .3 - 15, green * .3 - 15, blue * .3 - 15);
    // set stroke settings
    strokeJoin(MITER);
    strokeCap(PROJECT);
    // create turtle and adjust settings
    bigturtle = makeTurtle(width / 2, height / 2);
    bigturtle.setColor(255);
    bigturtle.setWeight(2);
    bigturtle.penDown();
    frameRate(999);
}

function draw() {
		for (var i=0;i<1;i++){
    	turtle = makeTurtle(-25,-25)
    	turtle.penDown
    }
        // set color variables for turtle
        var cx = constrain(mouseX, 0, 450);
		var cy = constrain(mouseY, 0, 450);
    	var red = cx * .58
		var green = cy * .58
		var blue = 108
		turtle.setColor(color(red,green,blue))
		turtle.setWeight(mouseY/20)
		turtle.penDown()
		turtle.forward(mouseY)// move depending on the y position of the mouse.
		turtle.right(90) // turn turtle right.
		turtle.forward(mouseX) // move again depending ont he xposition of the mouse.
		turtle.left(90) // turn turtle left.
		turtle.back(mouseX) // move again depending ont he xposition of the mouse.
		turtle.right(90) // turn turtle right.
		turtle.back(mouseX) // move again depending ont he xposition of the mouse.
		turtle.left(90) // turn turtle left.
		turtle.back(mouseX) // move again depending ont he xposition of the mouse.
	}

// 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 wanted to try to create hallway compositions with p5.js. I devised the following system in order to replicate hallways under a compliment color scheme when a user draws a line diagonally. Overall, I found the project stimulating and particularly informative in the inner workings of how the turtle function runs.

Example of a hallway being rendered with the code (1) when a line is drawing primarily diagonally towards the left.
Example of a hallway being rendered with the code (1) when a line is drawing primarily diagonally towards the right.
Free from random drawing.

JasonZhu_LookingOutwards11

This week, I chose to write about Ryoji Ikeda, a Japanese computational musician whose work uses computers in order to create music that can convey emotion differently and convey more complex concepts. In particular, I want to talk about one of his projects, Superposition, which is a collaborative work by Ryoji Ikeda with Stephane Garin, Amélie Grould in 2012.

Superposition is a project that aims to help people understand nature on an atomic scale. It was inspired by the mathematics that go into quantum mechanics. The project makes use of quantum information. While bits are typically displayed in binary (0 or 1), quantum information is QUBIT (quantum binary digits) where 0 and 1 superposed at the same time. This is incredibly concept conceptually, but is much more replicative of nature. Using sound as at the medium and quantum information is the inspiration, Ikeda takes significantly from computation in developing the work as well. It is nearly entirely data and algorithmic driven and makes a powerful commentary on the nature of computationally inspired and created music. This is perhaps what I most admire about the piece and the composer.

http://www.ryojiikeda.com/project/superposition/

An photo of the piece being performed.

Alessandra Fleck – Looking Outwards – 11

Created by a song done for German duo Meier & Erdmann, this example of computer generated music not only involves the use of algorithms to create music, but also how those patterns in the music can then be translated into a 3D digital landscape. Visual artist from Spain, Victor Doval utilizes the different frequency bands in the music to translate into a visual representation of the band. Inspired by the inherent “journey” music takes its audience on, the music is broken down into data that is then sorted and identified with different lights, shapes, and textures to overlay on the 3D shape and create that “journey” visually to the audience. Note in the background the change in the daylight and sun position as the song progresses. The background is a simple digital representation of the music timeline, where the sun rises in the beginning and sets at the end of the piece.

What I find most interesting about Doval’s work is the idea of visually representing the unseen and utilizing the patterns that can be heard and translating them into something that can be seen.

The above image is a screenshot from the visual landscape Doval creates from the music

Find more information at :

https://www.theverge.com/tldr/2017/4/12/15270026/music-video-algorithm-victor-doval-howler-monkey