Project-04-String-Art

I wanted to do a silhouette of Disney’s Ariel so I worked from a reference photo to sketch out the original plan.  However, after I was done with the silhouette, I realized she looks more like Aurora.  The overall coding was difficult but after I settled into a rhythm with her profile, it became a little easier.

Original sketch:

img_7424
sketch


//Naomi Shimada
//Section D
//nshimada@andrew.cmu.edu
//Project-04

var y = 100;
var x = 150;
var a = 250;
var b = 225;
var c = 280;
var d = 250;
var e = 325;
var f = 320;
var g = 390;
var j = 400;

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

function draw() {
 
 //right hand corner starting at (480,100)
   
   for (var i = 480; i>380; i = i-3){
    y = y-3;
    stroke(255);
    line(480,y,i,0);
 }

 //starts line of forehead 
 line(380,150,480,150); 

//lower right hair swoop
 while (x>100){
 for (var z = 380; z<480; z = z+3){
    stroke(255);
    line(z,150,480,x);
    x = x-3;
   }
 }

 //lefthairswoop
  for (var i = 0; i<280; i = i+3){
    d = d-3;
    stroke(255);
 line(0,d,i,0);
 }

 //forehead
 for (var i = 380; i<480; i = i+3){
 	 line(i,150,i,225);
 }

//nose
while (b<=230){
for (var i = 380; i<440; i = i+3){
	 line(i,225,i,b)
	 b = b+1;
    }
}

 for (var i = 440; i<480; i = i+3){
      line(i,225,i,304);
  }
 
 while (a<280){
 for (var i = 440; i>400; i = i-3){
 	 line(i,a,i,304);
 	 a = a+2;
    }
 }

 //nose to lip
 while (c<290){
 for (var i = 400; i>390; i = i-3){
 	 line(i,c,i,305);
 	 c = c+2;
    }
 }

 //upper lip
 while (e>=320){
 for (var i = 385; i<400; i = i+3){
	 line(i,f,i,e)
	 e = e-1;
   f = f+1;
    }
 }
 
 //filler background
 for(var i = 400; i<480; i = i+3){
  line(i,305,i,330);
 }

//filler background
 //for(var i = 385; i<400; i = i+3){
  //line(i,390,i,344);
// }

 //filler background
 for(var i = 400; i<480; i = i+3){
  line(i,331,i,390);
 }

 //lower right hair swoop
 while (g>344){
 for (var i = 375; i<400; i = i+3){
    stroke(255);
    line(i,390,400,g);
    g = g-3;
   }
 }

//neck
while(j<600){
 for(var i = 355; i<480; i = i+3){
    line(i,390,i,j);
    j = j + 3;
  }
 }

 //eyelashes
 push();
 stroke(0);
 strokeWeight(5);
 line(380,190,390,185);
 line(390,185,395,180);
 pop();

 push();
 stroke(0);
 strokeWeight(5);
 line(378,190,390,175);
 line(390,175,393,170);
 pop();

 }






 

Project 4-Lydia Jin

sketch

//Lydia Jin
//Section B
//jialuj@andrew.cmu.edu
//Project-04
//first quadrant intial values
var x1 = 0;
var y1 = 0;
var x2 = 0;
var y2 = 600;

//third quadrant intial values
var x11 = 0;
var y11 = 640;
var x22 = 0;
var y22 = 0;

//second quadrant intial values
var x111 = 0;
var y111 = 0;
var x222 = 480;
var y222 = 0;

//fourth quadrant intial values
var x1111 = 0;
var y1111 = 640;
var x2222 = 480;
var y2222 = 640;

//step sizes
var deltaX = 24;
var deltaY = 30;

//set initial value for i for if statement
i=0;

function setup() {
    createCanvas(480, 640);
    background('pink');

}

function draw() {
	//20 steps
	if (i < 20){
		//first quadrant
		x1 += deltaX;
		y2 -= deltaY;
		stroke(0);
   		line(x1,y1,x2,y2);
   		//third quadrant
		x11 += deltaX;
		y22 += deltaY;   		
   		line(x11,y11,x22,y22);
   		//second quadrant
		x111 += deltaX;
		y222 += deltaY;   		
   		line(x111,y111,x222,y222);
   		//fourth quadrant
		x1111 += deltaX;
		y2222 -= deltaY;   		
   		line(x1111,y1111,x2222,y2222);   
   		//repeat until i reaches 19
   		i++;

	}
	
}


	

1938792002

owen fox looking outwards 4

vib-ribbon is a rhythm game created in 1999 by Masaya Mastuura, a Japanese musician and game designer. The game was one of 14 to be exhibited in the first MOMA collection of interactive media. The game functions by using player selected music to generate levels: obstacles and landscapes are generated using the sound waves of whatever music is playing in the game.

Personally, I really like the game’s visual style and innovative use of semi-random generation, which was decidedly ahead of its time. I think the game exhibits a willingness to experiment that most video games would shy away from. Both the visual style and use of musical level generation also speak to the Masturaa’s artistic sensibility: the game is clearly inspired by vector graphics, and the abstract-cartoonesque character design owes a lot to the work of artists like Takashi Murakami.

I don’t know exactly how the algorithms in the game work but here’s my guess: since computers can visualize sound waves, and each point of articulation of a sound wave has certain numerical values associated with it, the game probably generates simple shapes based on those values.

ShanWang-Project-04-String-Art

In this project I first tried to create a gradient background with layers of lines like a spider web. Then I modified the code so that the central group of lines are accentuated with greater stroke weights.
At last, I created two groups of lines on the top left and down right corner of the canvas to give the entire composition a sense of enclosure.

sketch

//Shan Wang
//Section A
//shanw1@andrew.cmu.edu
//Project-04

var ref1Size; //size of gap for reference 1
var color;
var colorControl = 30;
var weight;
var ref1Control = 3.5;
var ref2Control = 1.5;
var weightControl = 16;
var interval1 = 10;
var interval2 = 15;

function setup() {
    createCanvas(640, 480);
    c1 = color(200, 219, 216);
    c2 = color(99,112,145);
}
// create the function that generates the gradient
function gradient(x,y,wid,hei,c1,c2){
    noFill();
    for (var i = x; i<x+wid; i++){
        var inter = map(i,x,x+wid,0,1);
        var col = lerpColor(c1,c2,inter);
        stroke(col);
        line(i,y,i,y+hei);
    }
}
function draw() {
    noLoop();
    weight = 0.2;
    color = 220;
    ref1Size = width/80;
    //create background gradient
    gradient(0,0,width,height,c1,c2);
    //create background grid patterns and accentuate the shape in the middle
    //use nested loop to generate multiple curves
    for (var i = 1; i<7; i++){
        for (var a = 0; a<18; a++){
            if (i%4 == 4){
                color += colorControl*1.5;
                weight -= 0.01*weightControl;
                ref1Size += 0.5;
            } else if (i%4 == 3){
                color += colorControl*0.5;
                weight -= 0.03*weightControl;
                ref1Size += 2;
            } else if (i%4 == 2){
                color += colorControl*0.3;
                weight = 0.015*weightControl;
                ref1Size += 0.5;
            } else if (i%4 == 1){
                color += colorControl*0.5;
                weight += 0.002*weightControl;
                ref1Size -= 0.5;
            } else {
                color += colorControl;
                weight += 0.008*weightControl;
                ref1Size += 0.5;
            }
            strokeWeight(weight);
            stroke(color,color,color);
            line(0,(i+1)*ref1Size*ref1Control*0.75,width,height-(a+1)*ref1Size*ref2Control);
        }
    }
    //draw partial web on the top left corner
    for (var i = 0; i<40;i++){
        stroke(color+i*5);
        strokeWeight(0.4);
        line(0,height/2-interval1*i,i*interval1,0);
    }
    //draw partial web on the down right corner
    for (var i = 0; i<70;i++){
        stroke(color+i);
        strokeWeight(0.3);
        line(i*interval2,height,width,height-interval2*i*2);
    }
}

Owen Fox Project 4

var i;
//a constant used for positioning
var c = 100;
//another constant used to manipulate framecount
var f = 50;

function setup() {
    createCanvas(640, 480);
}

function draw() {
	background("#00cc44");
  for (var i = 0; i < 60; i+=1) {
    //each of these sections seperates by white spice does two things
    //one, they draw a set of rectangles rotated according to the value of i
    //two, they draw a set of rectangles that roate according to framecount
    rectMode(CENTER);
    noStroke();
    fill("#00e64d");
    push();
    rotate(radians(i));
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate(radians(-i));
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate((i * radians(frameCount))/f);
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate((-i * radians(frameCount))/f);
    rect(width/2,height/2,2,2*c);
    pop();

    fill("#4dff88");
    push();
    translate(0,2*c);
    push();
    rotate(radians(i));
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate(radians(-i));
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate((i * radians(frameCount))/f);
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate((-i * radians(frameCount))/f);
    rect(width/2,height/2,2,2*c);
    pop();
    pop();

    fill("#4dff88");
    push();
    translate(0,-2*c);
    push();
    rotate(radians(i));
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate(radians(-i));
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate((i * radians(frameCount))/f);
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate((-i * radians(frameCount))/f);
    rect(width/2,height/2,2,2*c);
    pop();
    pop();

    fill("#1aff66");
    push();
    translate(0,c);
    scale(1,-1);
    push();
    rotate(radians(i));
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate(radians(-i));
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate((i * radians(frameCount))/f);
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate((-i * radians(frameCount))/f);
    rect(width/2,height/2,2,2*c);
    pop();
    pop();

    fill("#1aff66");
    push();
    translate(0,-c);
    scale(1,-1);
    push();
    rotate(radians(i));
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate(radians(-i));
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate((i * radians(frameCount))/f);
    rect(width/2,height/2,2,2*c);
    pop();
    push();
    rotate((-i * radians(frameCount))/f);
    rect(width/2,height/2,2,2*c);
    pop();
    pop();

  }
}

mreyes-project-04-string art

mreyes-project-04

//Mercedes Reys

//Section C 

//mreyes@andrew.cmu.edu

//Project-04

//colors
var r = 255;
var g = 0;
var b = 255;

var strokeW = 0 // starting stroke width

var canvasDev = 3 // canvas will be divides into 3rds 

function setup() {
    createCanvas(640,480);
    
}

function draw() {
	background(177,242,231)
    //var spaceing = 10
    //var growth = 30
    fill(0)
    for (var i = 0; i < 50; i ++) { //add 50 lines
    
     //variables based on canvas width 
     
     var x1 = width/2;
     var x2 = i*(x1/10);
     var y1 = x1-x2;
     var y2 = width-(x2);
     
     //color gradient
     r -= 7;
     g += 10;
     b -= 5; 
     strokeW += .01; // stroke width increases sligtly 
     stroke(r,g,b)
     line(x2,x1,x1,x1-(x2)); // original left lines
     line(x1,x1-(x2),y2,x1); // original right lines
     
     push();

     translate(0,height/canvasDev)//bottom 3rd lines

     line(x2,x1,x1,x1-(x2)); 
     line(x1,x1-(x2),y2,x1); 
     
     translate(width,height);//move the canvas over 
     angleMode(DEGREES);
     rotate(180);//flip canvase
     line(x2,x1,x1,x1-(x2)); 
     line(x1,x1-(x2),y2,x1); 
     pop();
     
     translate(width,height/2);//move the flipped canvas up 
     angleMode(DEGREES);
     rotate(180);
     line(x2,x1,x1,x1-(x2)); 
     line(x1,x1-(x2),y2,x1); 
     pop();
    
    noLoop() // stagnant image so gradient will work

    }

  


    
}



I initially tried to go with a design with more of a star in the center of the page but, found interesting things happening when experimenting with the translate and rotate function. Now it is something more abstract, but also more 3 dimensional.

Looking Outward 4 -Lydia Jin

This piece -Dazzled Project by David Dalmmazzo combines different types of sounds and symphonized them together. I really admire the combination of the visual component of this piece with the sound background. At first, the sound was quite disturbing, but then a really high toned string-like sound came out and changed the feel. I like the transition a lot. Also, the visual looks like a galaxy which is cool. The algorithm is not explained. But I suppose that the movement of the lines create sounds to make them sync. The creator’s art work shows that he likes changing elements and progressive themed art. The strings slowly accumulate in the center and created a rotating sphere.

Citation: https://vimeo.com/19440023

Looking Outwards-04-sehenry

I really like this week’s subject of computational soundscapes for many reasons. For one, I love it because I think it is so neat that we can bring digital substance into reality by converting it into many ways, sound being one of them. The other reason why I love this weeks LookingOutwards, is because I myself make digital music on numerous platforms like Fl Studio, Garage Band, and Pro Tools! Being able to look and see what you are changing and being able to manipulate something artificial so that something real takes form, is a wonder upon itself. The Tilt Brush took another step into digital reality by creating a new combination of music, art, and animation. They have allowed a person to equip themselves with the ability to paint in virtual reality and as a result, create sound. The video below can paint a better picture than I can but it truly is incredible that some people can see what others cannot. Drawing sound is a concept that I had never even thought of until I saw this video. Now I am even more intrigued and I want to do more research on it even after this week.
Creator: Tilt Brush
Article by: The Creators Project

Jinhee Lee; Project-04

jinheel1_project-04

//Jinhee Lee
//Section C
//jinheel1@andrew.cmu.edu
//Project-04

function setup() {
    createCanvas(640,480);
}

function draw() {
	background (0);

	//violin strings
	var neckX = 100; //starting position for neck of violin
	var bridgeX = 100; //starting position for bridge of violin
	var stringY = 0;
	var stringX1 = 10; //spacing for string near neck
	var stringX2 = 50; //spacing for string near bridge

	for (i = 0; i < 4; i += 1) { //draw four strings
		if (i == 0) {
			stroke("#87CEFA"); //sky blue "G" string
		} else if (i == 1) {
			stroke("#ADFF2F"); //light green "D" string
		} else if (i == 2) {
			stroke("#FFFF00"); //yellow "A" string
		} else if (i == 3) {
			stroke("#FFA500"); //orange "E" string
		}
		line(neckX,stringY,bridgeX+stringX2,height);
		stringX2 += stringX2; //spacing near bridge grows
		neckX += stringX1; //spacing near neck is constant
		//the difference in spacing creates a "zoom" effect
	}

	//violin bow
	var bowX = width;
	var bowY1 = 240; //y position at right edge
	var bowY2 = 280; //y position at left edge
	var bowY1step = 0.25; //smaller spacing for right edge
	var bowY2step = 0.75; //larger spacing for left edge

	stroke("#D2691E"); //brownish color for bow

	for (i = 0; i < 50; i += 1) { //relatively small spacing makes "solid" object
		line(bowX,bowY1,0,bowY2);
		bowY1 += bowY1step; //difference in spacing makes "zoom" effect
		bowY2 += bowY2step;
	}

	//violin bow hairs
	//same as bow, on slightly smaller scale
	var hairX = width; 
	var hairY1 = 265; 
	var hairY2 = 350; 
	var hairY1step = 0.15; 
	var hairY2step = 0.5; 

	stroke("#FFEBCD"); //almond color for bow hairs

	for (i = 0; i < 50; i += 1) {
		line(hairX,hairY1,0,hairY2);
		hairY1 += hairY1step;
		hairY2 += hairY2step;
	}
}

Originally I had planned to make two branching clusters of branching lines to simulate puppeteer strings, but felt that it lacked variety.

In the end, I opted to create a violin (which I played from elementary to high school) using the same technique I had in mind, but varying the spacing and positions of the “curves” to: a) draw the individual strings and overall bow and b) create a slanted perspective using an artificial “zoom” effect.

sajohnso Project-04-String-Art

sketch

/*
*Sadie Johnson
*15-104 Section C
*sajohnso@andrew.cmu.edu
*Project-04-String-Art
*This program draws art with lines
*/

function setup() {
    createCanvas(640, 480);
    background(225);
}

function draw() {
	var nop = 20; //nop = Number of Points 
	var spaceX = width/nop;
	var spaceY = height/nop;
	background('#2C9F88');

	for (i = 0; i < nop/2; i++) {
 	  //larger,central form
 		stroke('#2C8791'); //dark blue
 		strokeWeight(2);
 		//quadrants III & I
          line(i*spaceX, height/2, width/2, height/2+((i+1)*spaceY)); 
          line(width/2, height/2-((i+1)*spaceY), (width)-(i*spaceX), height/2);
        //quadrants II & IV 
          stroke('#91CDD4'); //light blue
          line(width/2, height/2+((i+1)*spaceY), (width)-(i*spaceX), height/2);
          line(i*spaceX, height/2, width/2, height/2-((i+1)*spaceY));
  }

  for (k = 0; k < 7; k++) {
    //smaller forms
          stroke('#91460C');
    	//quadrant IV
        line(width-(7*spaceX)+(spaceX*k),height,width-spaceX*k,height-(spaceY*k));
        line(width,height-(7*spaceY)+(spaceY*k),width-spaceX*k,height-(spaceY*k));
        //quadrant III
        line(0,height-(7*spaceY)+(spaceY*k),spaceX*k,height-spaceY*k);
        line(spaceX*7-(spaceX*k),height,spaceX*k,height-spaceY*k);
        //quadrant II
        line(spaceX*7-(spaceX*k),0,spaceX*k,spaceY*k);
        line(0,(7*spaceY)-(spaceY*k),spaceX*k,spaceY*k);
        //quadrant I
        line(width-(7*spaceX)+(spaceX*k),0,width-(spaceX*k),spaceY*k);
		line(width,(spaceY*7)-(spaceY*k),width-(spaceX*k),spaceY*k);

  }

}


 

My goal in this assignment was to recreate a fourth grader’s string art from the blog post linked to in the assignment (it’s shown below). I spent roughly half my time on this assignment trying to figure out how to create “curves”. Once I did, however, I was able to finish the assignment very quickly.

screen-shot-2016-09-23-at-4-24-47-pm