Project-07-CompositionWithCurves

sketch-70

//Victor Tavarez
//Section D
//vtavarez@andrew.cmu.edu
//Project-07-CompositionWithCurves


function setup() {
    createCanvas(500,500);
}

function draw() {
    background(60);
    push();
    translate(width/2, height/2);
    plotMiceProblem();
    pop()

}

function plotMiceProblem(){
    var nPoints = map(mouseY, 0, height, 0 ,1000);
    var x;
    var y;
    var n = map(mouseX, 0, width,0,10); // will be used to draw more itterations

    beginShape();
    //nPoint influenced by y value to give "drawing" effect
    for (var i=0; i < nPoints; i++){ 
        var t = map(i,0,nPoints,0,TWO_PI*n);
        noFill();
        var clrR = map(mouseX, 0, width,100,255); 
        var clrG = map(mouseX, 0, width,200,230);
        var clrB = map(mouseX,0,width,230,255);
        strokeWeight(4);
        stroke(clrR,clrG,clrB); // 
        //equations as listed on mathworld.wolfram.com/ButterflyCurve.html
        x = Math.sin(t) * (Math.pow(Math.E,Math.cos(t))
                        - 2*Math.cos(4*t) 
                        + Math.pow(Math.sin(t/12),5));

        y = Math.cos(t) * (Math.pow(Math.E,Math.cos(t))
                        - 2*Math.cos(4*t) 
                        + Math.pow(Math.sin(t/12),5));

        vertex(x*70,y*50); //wider than tall
    }
    endShape(CLOSE);  
}

For this project, I decided to represent the drawing of a Butterfly curve. To do so, I decided to link the draw function to a the mouseX value to give it the appearance of it ‘drawing’. The most difficult part of this was writing down the x and y equations because it involved Math operators I was unfamiliar with. Once I got the curve to draw, I implemented the changes that the mousex and mouseY would do. MouseX draws and colors the curve. MouseY also draws but smoothens the curve.

Looking-Outwards-07

Aaron Koblin uses design to visualize real world data. In the New York Talk Exchange, he is commissioned by the Senseable City Lab at MIT to display where New Yorkers (using the AT&T network) are calling around the world. The collection illustrates information flowing around the world from AT&T long distance telephone and IP data. I like the collection, particularly Global Encounters because it tracks real time data from around the world in a visually pleasing way. You can see how interconnected one city is to the rest of the world and see direct lines of communication throughout the world.

I could not find exactly how it worked, but I am guessing that it takes the coordinates of the two ends of communication and simply draws an arc around a sphere (shown as a globe) on a three-dimensional plane.

Graphs where people in NYC using the AT&T network call around the world.

Graphs where people in NYC using the AT&T network call around the world and restricted area.

 

LookingOutwards-06

Random-art.org uses a computer program that takes a name and then runs it through a pseudo-random number generator. I like the piece below, labeled “Demo Green” because it incorporates several colors and shapes. There are several operators that are randomized. I also like that the real artist is the programmer of the number generator which creates the possible outcomes. The generator allows users to create their own random pieces based on a word entry which is pretty unique.

demo_green

Project-06-Abstract Clock

My piece was started as a simple grid of circles representing the 60 minutes in an hour. I decided to add some complexity by making the background color and circle color inverted of one another. The number of rows represents the amount of each minute in a 10-minute interval in an hour. The number of columns represents the 10-minute intervals in the hour. I included a digital clock as a reference.

sketch-24.js

//Victor Tavarez
//Section D
//vtavarez@andrew.cmu.edu
//Assignment-06-Abstract Clock

function setup() { 
    createCanvas(500, 500);
}

function draw() {
    var d = new Date();
    var mils = nf(d.getMilliseconds(),2,0);
    var h = d.getHours()%12;
    var m = nf(d.getMinutes(),2,0);
    var s = d.getSeconds();
    drawBackground(h);// creates the background
    drawCircles(mils,s,m,h);
    whatTimeIsIt(h,m,s,mils);
}

function drawCircles(mils,s,m,h){
    var cols = m%10;
    var rows = m/10;
    noStroke();

     if (hour() > 12) { //after noon
        skyr =map(h,5,12,0,179);
        skyg =map(h,0,12,38,198);
        skyb =map(h,0,4,153,255);
    } else { //after midnight
        skyr =map(h,5,12,179,160);
        skyg =map(h,0,12,198,120);
        skyb =map(h,0,4,255,153);
    }
    fill(skyr,skyg,skyb);
    
    if (cols ==0) {
        text("Time to take a Break!", width/2,height/2);
    }
    for (var col = 1; col <= cols; col++){
        for (var row = 1; row <= rows; row++){
            ellipse((width/6)*row,(height/10)*col,s,mils/100)
        }
    }
}

function drawBackground(h){
    var skyr;
    var skyg;
    var skyb;
    if (hour() < 12) { //after noon
        skyr =map(h,5,12,0,179);
        skyg =map(h,0,12,38,198);
        skyb =map(h,0,4,153,255);
    } else { //after midnight
        skyr =map(h,5,12,179,160);
        skyg =map(h,0,12,198,120);
        skyb =map(h,0,4,255,153);
    }
    background(skyr,skyg,skyb);
}

function whatTimeIsIt(h,m,s,mils){
    var APM = ""; //determine if it is AM or PM
    if (hour()>=12){
        APM = "PM";
    } else{
        APM = "AM";
    }
    if (h == 0) {
        h=12;
    }
    var time = (str(h)+ ":" +str(m)+ ":" +str(s)+ ":" +str(mils)+ " " +APM); 
    textSize(25);
    textAlign(CENTER);
    fill(0);
    text(time, width/2,height/15);
}

vtavarez-Looking-Outwards-05

The song “Drugs” by Eden is complemented by this great piece of computational Virtual Reality art. The piece was filmed using a Canon 5D on top of a Kinect, which captured the real-time 3D data using a beta software. Creator, Stuart Cripps, worked hard to incorporate the experience of music into his piece and demoed it 2D system running Rift. The piece uses a series of lines to depict depth and perception. I really enjoy it for its narration of the story and use of virtual reality to immerse the user in the experience. I wish I knew how they incorporated the 2D view into the virtual reality experience, but I could not find anything on that process. I would assume it was putting together several 2d models

presentation1

vtavarez-project-05-wallpaper

sketch-246.js

//Victor Tavarez
//Section D
//vtavarez@andrew.cmu.edu
//Assignment-05-B

function setup() {
    createCanvas(500, 500);

}


function draw() {
    background(100,100,255);
    for (var x=0; x<=width; x+=50){
        for(var y=0; y<=height; y+=50) {
            drawT(x,y);
            drawV(x,y);
            
        }
    }
    for(var x=0; x<=width; x+=50){
        for(var y=-25; y<=height+25; y+=50){
            drawDot(x,y);
        }
    }
    for(var x=0; x<=width; x+=50){
        for(var y=0;y<=height;y+=50){
            drawSquares(x,y);
        }
    }
}

function drawSquares(x,y){
    noStroke();
    fill(255,100,100);
    if (x/50%2==1){ //50 since x is in terms of pixels
        rect(x-10,y-10,5,5);
        rect(x+5,y-10,5,5);
    } else{
        rect(x-10,y+5,5,5);
        rect(x+5,y+5,5,5);
    }
}

function drawDot(x,y){ //creates a dot before T/V figure
    noStroke();    
    fill(0,100,240);
    ellipse(x,y,5,5);
}

function drawV(xV1,yV1){ //draws V shape at every T
    var xV2 = xV1-5;
    var xV3 = xV1+5;  
    var yV2 = yV1-15;//arrow up
    var yV3 = yV1+15;//arrow down
    
    stroke(220,100,245);
    strokeWeight(2)
    if (xV1/50%2==1) {//depending on the column the figure flips
        line(xV1,yV1,xV3,yV3);
        line(xV1,yV1,xV2,yV3);
    } else{
        line(xV1,yV1,xV2,yV2);
        line(xV1,yV1,xV3,yV2);
    }
}

function drawT(xT1,yT1){
    var xT2 = xT1-15;
    var yT2 = yT1;
    var xT3 = xT1+15;
    var yT3 = yT1;
    var xT4 = xT1;
    var yT4 = yT1-15;
    //upsidedownT
    var xT5 = xT1;
    var yT5 = yT1+15;

    stroke(220,100,245);
    strokeWeight(2);
    // if statment will alternate the direction of the T's
    if ((xT1/50)%2==1){
        line(xT2,yT2,xT3,yT3);
        line(xT1,yT1,xT4,yT4);
    } else{
        line(xT2,yT2,xT3,yT3);  
        line(xT1,yT1,xT5,yT5);

    }
}

Project-05: String Art

sketch-233

//Victor Tavarez
//Section D
//vtavarez@andrew.cmu.edu
//Project-04


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

function draw() {

    background(60);

   stroke(49,19,255);// rain like blue meant to cover background
   for (var x5 = 0; x5<width; x5+=width/50) {
       for(var y5 = 0; y5 < height; y5 +=height/40){

           line(x5, y5, x5+10, y5+30);
       }
   }
    stroke(240,255,250);//light source from an angle meant to give the piece a further dimension
    for (var x4=50;x4<=width*9/10;x4*=1.10) {
         for(var y4=50;y4 <=height*8/10;y4*=1.10) {
            line(x4,y4,width/6,height/2);
        }
    }

    // the following figures are mmeant to be similarand are meant to look like legs. 

    stroke(234,103,200);
    for (var x1 = 0; x1 <= width; x1+=100) {
        for (var y1 = 0; y1 <= height; y1+=10){
             line(x1,y1,x1+40,x1+40);
        }
    }

    stroke(190,253,213);
    for(var x2 = width; x2 >=0 ; x2-=100) {
        for(var y2 = height-40; y2 >= 0; y2-=10){
            line(x2,y2, x2+40, x2+40);
        }
    }     
   
   stroke(140,120,232);
   for(var x3 = 0; x3 <=width;x3+=100){
       for(var y3 = height; y3 >= 0; y3-=10){
            line(x3,0,x3+40,y3-200);
       }
   }   
   

}   

I restarted this project a few times. I wanted to experiment using the look system and incorporate the various functionalities I discovered in one piece. Although a bit abstract, the image above is supposed to depict a person crossing the street on a raining day. More importantly, the image uses short and frequent lines to simulate rain in the back layer of the image. By connecting many points to pixel, I was able to simulate distance and light using white lines. for the rest of the images I tried to emulate the stage of walking. with the green lines representing stepping forward in how the “knee” moves downward. In the future I hope to be able to use these with animation to simulate movement.

VictorTavarez-LookingOutwards-04

The Wrong Way to Draw a Pirate’s Soundtrack is a graphical representation of the musical composition “He’s a Pirate” by artist Juanky Soriano. The piece is part of a larger series “The Wrong Way to Draw the Music”, which explores his experimentation with a generative drawing system using music performance. According to his website, his experiment analyzed Midi files into MusicString files. He developed a “midi2mstring” library to do so. Within the library every token is tied to a musical event. Next, he crafted his sketch using Processing to assign each token to a drawing event.

I think the project could have been improved by adding different allowing prior tokens to disburse after they are drawn. The layering on top of one another gave the piece a sloppy look. From my interpretation, I think Soriano is inspired by computational models based in living cells and so his use of p-systems are quite common.

Victor Tavarez-LookingOutwards-03

MATSYS Design’s Seacraft Eggs is a piece that came out of a course at the Advanced Architecture Studio at the California College of Arts in 2013. The purpose of this design was to find the relationship between craft and design and use something technical to make it poetic. The artist were inspired by Malcolm McCullough’s 1996 book Abstracting Craft, which covers these topics.

What inspired me about this piece was the fact that every egg is made up of a different algorithm. Although I can not directly identify them, nor could I locate them online, I can see a range of simple polygons and complex lines a used. Although I like the variety of designs, I do think there could have been many many more.  Seacraft egg

Vtavarez Project-03: Dynamic Drawing

Working on this project I wanted the ability to display colors opposite of each other on the color wheel at the same time. From that I knew I wanted to add three shape series (one for each RGB value). Figuring out the concept of the piece took a little longer. Believe it or not, this is an abstract attempt to model what its like to adjust your an analogue clock. The circle represents the gears shifting with one another, the center “flashing” circle signifies the frustration of trying to get it to the right time, and the hands are pretty obvious. In working on this piece, I tried to use some of the simple tools we learned in class regarding transformations and variables.

sketch-165.js

//Victor Tavarez
//section D
//vtavarez@andrew.cmu.edu
//Project-03-Dynamic-Drawing 

// varying background RGB values
var bgR = 0;
var bgG = 0;
var bgB = 0;

var Sh1R;
var Sh1G;
var Sh1B;

var CircleSize = 20;

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

}

function draw() {
    background(bgR, bgG, bgB);
    noStroke();

    //modifying the background to "season-changing colors"
    bgR = map(mouseY, 0, height, 0, 255);
    bgG = map(mouseX, 0, width, 0, 255);
    
    // modifying my first set of shapes
    Sh1R = (abs(255-bgR));
    Sh1G = (abs(255-bgG));
    Sh1B = (abs(255-bgB));

    //creating different shapes with the same color changing scheme
    var Sh1aX = width/5;
    var Sh1aY = height/5;
    var Sh1D = 75;
    fill(Sh1R,Sh1G,Sh1B);

    // creating vertical changing in shape 1 category
    Sh1aY = map(mouseY,0,height,height/5, (height-height/5));
    ellipse(Sh1aX, Sh1aY, Sh1D, Sh1D);    
    var Sh1bX = width-Sh1aX;
    var Sh1bY = height-Sh1aY;
    ellipse(Sh1bX, Sh1bY, Sh1D, Sh1D);

    // Creating Horizontal changing for Shape 1 category
    var Sh1cX = Sh1aX;
    var Sh1cY = height - height/5;
    Sh1cX = map(mouseY,0,height,width/5, (width-width/5)); //gets x motion
    ellipse(Sh1cX, Sh1cY, Sh1D, Sh1D);

    // Creating final horizontal trasformation
    var Sh1dX = width - Sh1cX;
    var Sh1dY = height/5;
    ellipse(Sh1dX, Sh1dY, Sh1D, Sh1D);

    // Modifying the second set of Shapes 
    var Sh2R = (abs(255-bgB));
    var Sh2G = (abs(255-bgR));
    var Sh2B = (abs(255-bgG)); 
    fill(Sh2R, Sh2G, Sh2B);
    
    // creating the attibutes of new shapes
    var Sh2aX = width/2;
    var Sh2aY = height/2;
    var Sh2W = 30;
    var Sh2H = 70;
    var Sh2aDeg = 0
    
    push();
    Sh2aDeg = map(mouseX, 0, width, 0, 360);
    translate(Sh2aX,Sh2aY);
    rotate(radians(Sh2aDeg));
    rect(0, 0, Sh2W, 3*Sh2H,50);  
      
    //secondary shape in this series
    var Sh2bX = (width/2);
    var Sh2bY = (height/2);
    var Sh2bDeg = map(mouseX,0,width,0,360);
    rotate(radians(Sh2bDeg));
    rect(0,0, Sh2W,3*Sh2H, 50);
    pop();

    //final shape series 
    
    var Sh3R = (abs(255-bgG));
    var Sh3G = (abs(255-bgB));
    var Sh3B = (abs(255-bgR)); 
    fill(Sh3R,Sh3G,Sh3B);
    
    var SizeModifier = abs(mouseX-mouseY);

    if (CircleSize > 100) {
        SizeModifier *=-1
    }
    CircleSize += SizeModifier
    ellipse(width/2, height/2, CircleSize, CircleSize);
}