myoungsh-project11-“OFF-PROJECT”

“MOUSE.PRESS”

sketch

var S = 25;
var M = 50;
var L = 200;
var pickColor;
function setup() {
  createCanvas(800,800);
  background(0);
}
function mousePressed() {
  pickColor = floor(random(0, 2));
  drawThing(mouseX, mouseY);
}
function drawThing(x, y) {
  strokeCap(PROJECT);
  T = makeTurtle(x, y); 
  T.setWeight(5);
  T.setColor(color(256, 256, 0));
  T.right(90);
  T.forward(S/2);
  T.left(90);
  T.forward(S);
  T.right(90);
  T.forward(S);
  T.left(135);
  T.forward(M);
  T.left(90);
  T.forward(M);
  T.left(135);
  T.forward(S);
  T.right(90);
  T.forward(S);
  T.left(90);
  T.forward(S/2);
  T.penUp();
  T.right(90);
  T.forward(L);
  T.penDown();
  T.right(90);
  T.forward(S/2);
  T.left(90);
  T.forward(S);
  T.right(90);
  T.forward(S);
  T.left(135);
  T.forward(M);
  T.left(90);
  T.forward(M);
  T.left(135);
  T.forward(S);
  T.right(90);
  T.forward(S);
  T.left(90);
  T.forward(S/2);
  T.penUp();
  T.right(90);
  T.forward(L/2+2);
  T.right(90);
  T.forward(L/2+2);
  T.penDown();
  T.right(90);
  T.forward(S/2);
  T.left(90);
  T.forward(S);
  T.right(90);
  T.forward(S);
  T.left(135);
  T.forward(M);
  T.left(90);
  T.forward(M);
  T.left(135);
  T.forward(S);
  T.right(90);
  T.forward(S);
  T.left(90);
  T.forward(S/2);
  T.penUp();
  T.forward(2);
  T.right(90);
  T.forward(L);
  T.penDown();
  T.right(90);
  T.forward(S/2+2);
  T.left(90);
  T.forward(S);
  T.right(90);
  T.forward(S);
  T.left(135);
  T.forward(M);
  T.left(90);
  T.forward(M);
  T.left(135);
  T.forward(S);
  T.right(90);
  T.forward(S);
  T.left(90);
  T.forward(S/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;}

 

ssharada-lookingoutwards11

^Cope’s Emmy Bach style prelude.

David Copeis an American author, composer, scientist, and former professor of music at the University of California, Santa Cruz. His primary area of research involves artificial intelligence and music; he writes programs and algorithms that can analyse existing music and create new compositions in the style of the original input music. His EMI (Experiments in Musical Intelligence) software has produced works in the style of various composers, some of which have been commercially recorded (Cockrell 2001)—ranging from short pieces to full length operas. As a composer, Cope’s own work has encompassed a variety of styles—from the traditional to the avant-garde—and techniques, such as unconventional manners of playing, experimental musical instrument, and microtonal scales, including a 33-note system of just intonation he developed himself (Cockrell 2001). Most recently, all of his original compositions have been written in collaboration with the computer—based on an input of his earlier works. He seeks a synergy between composer creativity and computer algorithm as his principal creative direction

heeseoc-Project-11-Composition

sketch

//Steph Chun
//Section A
//heeseoc@andrew.cmu.edu
//Project-11

var turtle, turtle2;
var angle = 20;
var side = 5;
var angle2 = 160;
var side2 = 10;

function setup(){
    createCanvas(400,400);
    background(20,20,50);
	frameRate(10);
	//circular geometric shape
	turtle = makeTurtle(random(0,width), random(0,height));
	//spikey geometric shape expanding from the center
	turtle2 = makeTurtle(width/2, height/2);
}

function draw(){
	stroke(255);
	strokeWeight(.8);
	textSize(14);
	text("click anywhere!", 5, 20);

	//circular geometric shape 
	for (var i = 0; i < 30; i++){
		turtle.setColor(color(random(150,255), random(200,255), random(200,255)));
	    turtle.penDown();
	    turtle.setWeight(.2);
	    turtle.left(angle);
	    turtle.forward(side);
}
	turtle.right(10);
    side += .5;

    //spikey geometric shape expanding from the center
	turtle2.setColor(color(random(150,255), random(200,255), random(100,255)));
    turtle2.penDown();
    turtle2.setWeight(.3);
    turtle2.left(angle2);
    turtle2.forward(side2);
    turtle2.right(5);
    side2 += 2;

}

//creating spiral shape on mouseclick 
function mousePressed(){
	turtle = makeTurtle(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;}

While I was exploring what I can do with turtles, I noticed how I can make interesting spirals through drawing lines and manipulating angles. At first, I was trying to execute these (not-so-exactly) circular spirals with some random factors on mouseclick, but then it looked somewhat boring with only those on a dark background. So I re-generated one of the spirals that I thought was interesting and placed it at the center. After a while I left the code alone, it made this interesting circular shape even though it started off as a rather angular and spikey shape, which I thought resonated with the circular shapes that are being created on mouseclick. I liked how it has an interactive component, but later on, the user is like swallowed by the dense spiral and notice the connection between the two seemingly different elements.

ssharada-project11-composition

sketch-132.js

//shariwa sharada 
//ssharada@andrew.cmu.edu
//section a 
//project 11

//setting initial starting points for the turtles
dx = 127
dX = 127

function setup(){
  createCanvas(200, 480);

//creating the turtles using the below trutle commands
  turtle  = new makeTurtle(dx+20, 50);
  turtle2  = new makeTurtle(dx+50, 305);
  turtle3  = new makeTurtle(dx+90, 255);
  turtle4  = new makeTurtle(dx-60, 285);
  turtle5  = new makeTurtle(dx-90, 0);
  turtle6  = new makeTurtle(dx-110, 275);
  turtle7  = new makeTurtle(dx+100, 575);

}

function draw(){

  background(0, 10);
  noFill();

//drawing turtle shapes
  drawShape1();
  drawShape2();
  drawShape3();
  drawShape4();
  drawShape5();
  drawShape6();
  drawShape7();

}

//creating the different circles 
//sizing is varied using  the size of the object moving forward
//speed of the circles moving is depedent on the angle

//the stroke weight of each line depends on the position of the y point of the cursor
//radius of each circle is dependent on the mouseX cursor position

function drawShape1(){
    turtle.setWeight(1 + mouseY/30)
    turtle.right(2 + mouseX/100);
    turtle.forward(1);
}

function drawShape2(){
    turtle2.setWeight(random(2 + mouseY/30,9 + mouseY/30))
    turtle2.right(-3 );
    turtle2.forward(4 + mouseX/100);
}

function drawShape3(){
    turtle3.setWeight(random(1 + mouseY/30, 2 + mouseY/30))
    turtle3.right(6 + mouseX/150);
    turtle3.forward(10);
}

function drawShape4(){
    turtle4.setWeight(random(3 + mouseY/30,6 + mouseY/30))
    turtle4.right(10);
    turtle4.forward(6 + mouseX/175);
}

function drawShape4(){
    turtle4.setWeight(random(4 + mouseY/30, 2 + mouseY/30))
    turtle4.right(10);
    turtle4.forward(6 + mouseX/200);
}

function drawShape5(){
    turtle5.setWeight(random(3 + mouseY/30,6 + mouseY/30))
    turtle5.right(7);
    turtle5.forward(20 + mouseX/225);
}

function drawShape6(){
    turtle6.setWeight(random(1 + mouseY/30, 5 + mouseY/30))
    turtle6.right(-7);
    turtle6.forward(13 + mouseX/250);
}

function drawShape7(){
    turtle7.setWeight(random(1 + mouseY/30, 5 + mouseY/30))
    turtle7.right(-4);
    turtle7.forward(10 + mouseX/250);
}


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

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(255, random(40, 110)),
                  weight: 5,
                  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 was inspired by brush strokes and watercolour paint because of which I tried to create these circles by making the flow of the circles the brush stroke style. As the cursor moved, the thickness of the stroke changes like the brush stroke.

^thin line weights with a lower mouseY value

^thick line weights with a higher mouseY value

heeseoc-LookingOutwards-11

I happened to stumble upon this piece named Automatic Orchestra while I was browsing the internet for algorithmic or computational compositions. It is basically an audio installation, orchestrated by networked machines and people. Students from the University of the Arts, Bremen and the Copenhagen Institute of Interaction Design created the setup, which consists of twelve pods, each with a controller attached to speakers. All pods are wired together to form a network transmitting musical data. Therefore the data travels through each unit before it is passed on to the next one. An interesting part of this project is that each pod will interpret and alter the same data that has been passed on based on its individual algorithmic rule set, which is like having their own personalities as instruments. So the music takes on different qualities depending upon the artist who programmed it. In contrary to the immediate impression of “computational music” that feels very robotic and cyber, this piece has some humanistic attributes that adds an extra point of interest.

http://resonate.io/2015/projects/automatic-orchestra/

rsp1-LookingOutwards

NSynth: Neural Audio Synthesis

NSynth is Google Magenta’s—a small team of Google AI researchers —latest project. Their main pitch was that this new system will provide musicians with an entirely new range of tools for making music. It take different sounds from different instruments, and blends them together creating an entirely new sound as the creator can also alter how much of one sound is used.

According to an article in the New York Times, “The project is part of a growing effort to generate art through a set of A.I. techniques that have only recently come of age. Called deep neural networks, these complex mathematical systems allow machines to learn specific behavior by analyzing vast amounts of data. ” (https://www.nytimes.com/2017/08/14/arts/design/google-how-ai-creates-new-music-and-new-artists-project-magenta.html)

Image result for nsynth google
images of soundwaves from the original file to the altered file

 

The following link below contains samples of the types of sounds that NSynth can generate:

https://magenta.tensorflow.org/nsynth

Below is an interactive page where you can mix and match your own sounds:

https://experiments.withgoogle.com/ai/sound-maker/view/

 

katieche-project 11

katieche-10

var t1;
var t2;
var t3;

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

    // starts the turtle at a random location in the canvas
    t1 = makeTurtle(random(0, 480), random(0, 480));
    t2 = makeTurtle(random(0, 480), random(0, 480));
    t3 = makeTurtle(random(0, 480), random(0, 480));

    //puts pen down and sets colors and weight of each line
    t1.penDown();
    t1.setColor(color(190, 210, 240));
    t1.setWeight(3);
    t2.penDown();
    t2.setColor(color(200, 240, 210));
    t2.setWeight(3);
    t3.penDown();
    t3.setColor(color(250, 190, 210));
    t3.setWeight(3);
    frameRate(10);
}
 
function draw() {
    //starts making the turtle move
    t1.forward(10);
    t2.forward(10);
    t3.forward(10);
    //makes the turtle turn towards the mouse
    t1.turnToward(mouseX, mouseY, 10);
    t2.turnToward(mouseX, mouseY, 10);
    t3.turnToward(mouseX, mouseY, 10);

}

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 just wanted to do something that reminded me of like things flying in the air, so I went with powerpuff girls colored lines that fly and do spins in the air. They fly following your mouse, and do circles in place when you mouse is not in motion.



sntong-Project 11: Freestyle: Playing with your Turtle(s)

sketch

// Scarlet Tong
// sntong@andrew.cmu.edu
// Section A
// Project 11: Freestyle: Playing with your Turtle(s)

// intialize global Turtle
var nTurtle;

function setup(){
  createCanvas(400,400);
  background(0);
  frameRate(60);
}


function draw(){
  // draw a new pattern when mouse is pressed located at mouseX and mouseY
if (mouseIsPressed) {

  nTurtle = new makeTurtle(mouseX,mouseY);
  // offset of lines from the center according the location of mouseX on the canvas
  var step = map(mouseX,0,width,2,40);
  // rotation of the lines stop and start at a location that is determined by mouseY
  var ratio = map(mouseY,0,height,100,150);
  // Each pattern as a maxium of 20 lines
  for (var i = 0; i < 20; i++) {
    nTurtle.setColor(color(random(255),random(100,255),random(100,255)));
    // lines function found below draw function
    lines();
    // start drawing shapes
    nTurtle.penUp();
    // offset the next lines step pixels away from the previous one
    nTurtle.forward(step);
    // rotate that new line with a set angle
    nTurtle.right(ratio);
    // end the shape
    nTurtle.penDown();
    }
  }

}


// draw lines
function lines(){
    nTurtle.setWeight(1);
    nTurtle.penDown();
    nTurtle.forward(5);
    nTurtle.penUp();
}


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 create a changing pattern that will track the mouse when it is pressed down. The pattern is drawn by the turtle graphics and has varying color.

Possible drawings to be made with the code
Drawing 2

 

akluk-Project-11-TurtleFreeStyle

For this project, I simply just used a lot of randomization while trying to emulate the game of snakes with different colors for trails they leave. Below is an image of my draft

A simple draft

SImple example of what the program draws

sketch
//Alvin Luk
//Section A
//akluk@andrew.cmu.edu
//Assignment-10-A

//define line weight, starting positions of turtles, right angle, 
//a unit of length for patterns, array of turtles, and max number of iterations
var line_weight = 10;
var r = 90;
var unit = 10;
var turtles = [];
var max_num = 34;
var cols = [];
function setup() {
    //setup canvas and stroke properties
    createCanvas(479, 479);
    background(255);
    stroke(0);
    strokeJoin(MITER);
    strokeCap(PROJECT);
    cols = [color(60,186,84),color(244,194,13),color(219,50,54),color(72,133,237)];
    //adds each turtle to its appropriate location, stroke weight
    //color, and also initial orientation. 
    for (var i = 0; i < cols.length; i++){
    	turtles.push(makeTurtle(width/2,height/2));
    	turtles[i].setWeight(line_weight);
    	turtles[i].setColor(cols[i]);
    	for (var j = 0; j < i ; j++) {
    		turtles[i].left(r);
    	}
	}
}


function draw() {
	for (var i = 0; i < turtles.length; i++){
		var k = random(10,30);
		var dir = random([0,1]);
		turtles[i].forward(k);
		if (dir == 0){
			turtles[i].left(r);
		}
		else {
			turtles[i].right(r);
		}
	}
}


function mousePressed(){
	turtles = [];
	for (var i = 0; i < cols.length; i++){
		turtles.push(makeTurtle(mouseX,mouseY));
    	turtles[i].setWeight(line_weight);
    	turtles[i].setColor(cols[i]);
    	for (var j = 0; j < i ; j++) {
    		turtles[i].left(r);
    	}
	}
}

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

monicah1-project-10-SectionA

sketch

// noise() function. 

var angleSpeed = 0.0005;
var angle = 0.005;

function setup() {
    createCanvas(480, 150);
    frameRate(20);
    background(0);
}
 
function draw() {
    
    // light sources shining on the living things
    beginShape(); 
    for (var x = 0; x < width; x++) {
        var t = (x * angle) + (millis() * angleSpeed);
        var y = map(noise(t), 0,1, 0, height);
        vertex(x, y); 
    }
    for (var x = 0; x < width; x++) {
    	fill(255,240,0);
        var t = (x * angle) + (millis() * angleSpeed);
        var y = map(noise(t), 1,4, 1, height);
        vertex(x, y); 
    }
    for (var x = 0; x < width; x++) {
        var t = (x * angle) + (millis() * angleSpeed);
        var y = map(noise(t), -3,10, -3, height);
        vertex(x, y); 
    }
    endShape();

    //living things
    for (var i = 0; i < 100; i++) {
        ellipse(random(width), random(height), 0.5);
    }
    
    
}

Here, the scenario is to have light sources projected on flock of living creature in a dark night. The light source moves randomly spotting the flock. I was interested in playing with the combination of movements and randomness of small scale objects and pieces of geometric shapes. The final sketch seems fairly success from what I imagined it to be.