Project-09-Portrait

For this project, I want to convey the feeling of the breeze with the moving waves made of pixels.

sketch
//jiaqiwa2; Jiaqi Wang; Section C
var portrait;
//I learned & referenced how to make a moving sin wave from this example:
//https://p5js.org/examples/math-sine-wave.html
let xspacing = 5; // Distance between each horizontal location
let w; // Width of entire wave
let theta = 0.0; // Start angle at 0
let amplitude = 20.0; // Height of wave
let period = 700.0; // How many pixels before the wave repeats
let dx; // Value for incrementing x
let yvalues; // Using an array to store height values for the wave
var num=8;

function preload(){

	portrait=loadImage("https://i.imgur.com/J6Im42B.jpg");
}


function setup() {
  createCanvas(460,400);   
  w = width + 16;
  dx = (TWO_PI / period) * xspacing;
  yvalues = new Array(floor(w / xspacing));
  frameRate(10);
    
}



function draw() {
  //image(portrait,0,0,460,400);
  background(250);
 //gradually "open" the portrait
 if(num<40){
   num+=0.5;
  }

 for(var i=0;i<num;i++){
 	var yUpper;
  var yLower;
  
  yUpper=height/2-i*5;
  yLower=height/2+i*5;
  amplitude+=1;
  if(amplitude>40){
    amplitude-=1;
  }  

  calcWave();
  renderWave(yUpper);
  renderWave(yLower);


  
  
    }
  
}

function calcWave() {
  // Increment theta (try different values for
  // 'angular velocity' here)
  theta += 0.02;

  // For every x value, calculate a y value with sine function
  let x = theta;
  for (let i = 0; i < yvalues.length; i++) {
    yvalues[i] = sin(x) * amplitude;
    x += dx;
  }
  
}


function renderWave(Start) {
  noStroke();
  
  // draw the wave with an ellipse at each location
  for (let x = 0; x < yvalues.length; x++) {
  	//y postition of the ellipse
  	var y=Start + yvalues[x];
  	//x position of the ellipse
  	var X=x * xspacing;
  	//find the corresponding pixel's location on my portriat
  	var Px=map(X,0,460,0,portrait.width);
    var Py=map(y,0,400,0,portrait.height);
    //check if this pixel is within the canvas.
    if(y>0 & y<400){
    	let pix = portrait.get(Px, Py);
        fill(pix);
        ellipse(X, y, 7, 7);

    }
    
  }
}
my original portrait
screenshot
screenshot 2

LookingOutwards-09

I think this project is very performance-oriented in the way it captures the nuance of the changing surroundings from a more philosophical aspect. In creating the garments, the designer was inspired by a patient whose self-identity changes depends on the surroundings. I do agree with Isabel on how this project embodies the complexity and rhythm of the changing environment. To a certain extend, I also agree with her notion on how this project questions the traditional assumptions about clothing with the use of technologies and computation, but I believe the innovative part is not all about combining robotics with fabrication. On a deeper level, it challenges us to reflect on the role of the clothes and the wearer. In the past, human chose what to wear base on their needs, which is constantly changing as the weather, social occasion, and many other variables would be taken into considerations, but this new garment has its judgment, whether rational or not, on how to react to the immediate present.

I would say that the message that the creator wanted to deliver is more about the philosophical relationship between individuals and the changing surrounding, and less on the algorithm and the tools she used.

Ying Gao, 2019, “flowing water, standing time”.

@Isable Xu LookingOutwards-03: https://courses.ideate.cmu.edu/15-104/f2020/2020/09/19/lookingoutwards-03-4/

Project 09: Computational Portrait

HCP
//Hayoon Choi
//hayoonc
//Section C

let img;
var click = 0; //initial click status

function preload() {
    img = loadImage('https://i.imgur.com/5Ka0n6z.jpg?1');
}

function setup() {
    createCanvas(330, 440);
    imageMode(CENTER);
    noStroke();
    background(255);
    img.loadPixels();
}

function draw() {
    //pointilizing the picture
    let pointillize = map(mouseX, 0, width, 3, 7);
    let x = floor(random(img.width));
    let y = floor(random(img.height));
    let pix = img.get(x, y);
    fill(pix);
    if (click == 0){ //drawing pumpkin initially
        pumpkin(x, y, pointillize, pointillize);
    } else if (click == 1){ //drawing ghost after one click
        ghost(x, y, pointillize, pointillize);
    } else { //drawing bat after two clicks
        bat(x, y, pointillize, pointillize);
    }
}

function pumpkin(x, y){
    //drawing the pumpkin
    push();
    translate(x, y);
    rect(5, -10, 2, 6, 70);
    ellipse(12, 0, 5, 9);
    ellipse(0, 0, 5, 9)
    ellipse(3, 0, 5, 11);
    ellipse(9, 0, 5, 11);
    ellipse(6, 0, 5, 12);
    pop();
}
function ghost(x, y){
    //drawing the ghost
    push();
    translate(x, y);
    ellipse(0, 0, 9, 10);
    ellipse(-5, 3, 5, 2);
    ellipse(5, 3, 5, 2);
    beginShape();
    curveVertex(-4.5, 0);
    curveVertex(-4.5, 0);
    curveVertex(-3, 4);
    curveVertex(-1, 6);
    curveVertex(2, 9);
    curveVertex(6, 11);
    curveVertex(5, 8);
    curveVertex(4, 4);
    curveVertex(4.5, 0);
    curveVertex(4.5, 0);
    endShape();
    pop();
}
function bat(x, y){
    //drawing the bat
    push();
    translate(x, y);
    ellipse(0, 0, 7, 10);
    wing(); //calling the right wing
    push()
    scale(-1, 1); //flipping the wing to draw the left wing
    wing();
    pop();
    triangle(2, -3, 1.9, -6, 0, -4.6);
    triangle(-2, -3, -1.9, -6, 0, -4.6);
    pop();
}

function wing(){
    //drawing the wing
    beginShape();
    curveVertex(3, -2);
    curveVertex(3, -2);
    curveVertex(6, -2);
    curveVertex(11, -3);
    curveVertex(13, 0);
    curveVertex(11, 0);
    curveVertex(10, 0.3);
    curveVertex(10, 2);
    curveVertex(8, 1);
    curveVertex(6.7, 0.7);
    curveVertex(6, 2);
    curveVertex(5, 1);
    curveVertex(4.3, 0.7);
    curveVertex(3.6, 0.9);
    curveVertex(3, 2);
    curveVertex(3, 2);
    endShape();
}

function mousePressed() {
    //making the shapes to change after mouse click
    if (click == 2) { 
        click = 0;
    } else {
        click += 1;
    }
    if (mouseButton === RIGHT) { //right click restarts the process
        background(255);
    }
}

Since it’s Halloween, I decided to make all shapes Halloween related. The shapes change when the mouse clicks on the canvas and it restarts the process if the mouse right clicks.

Drawn with just pumpkins
Drawn with just ghosts
Drawn with just bats

Looking Outwards 09: on Looking Outwards

For this week, I looked at 101’s week 9 LO about computer graphics. He/she introduced me to the project Melting memories by Refik Anadol, which was displayed in Pilevneli Gallery from February 7 through March 17, 2018. In the post, he/she mentioned how it was interesting to see a project that intersects physical and digital reality, art, and neuroscience. I agree with that since, besides from its outstanding graphics, the fact that it showcased materiality of remembering captured my attention. I thought Anadol’s way of displaying advanced technology and the study of human memory was creative. The method of gathering data and implying it to the installation was also unique. For this project, participants were asked to focus on specific long-term memories during the recording process. Then the researchers looked at certain nodes with limited frequency rates and used them to drive noise parameters within the real time simulation. 

Melting Memories

Peer link: https://courses.ideate.cmu.edu/15-104/f2020/2020/10/03/looking-outwards-05-3d-computer-graphics-5/

Project-09-Portrait

sketch

I chose the photo I took in LA. So, I decided it to draw and color with the text “LA” according to the mouse position, along with the pixels draw and color with the rectangle.

original photo
after first few seconds
after few minutes
after few more minutes

//Jae Son , Section C

var Jae;

function preload() { 
  var imageURL = "https://i.imgur.com/BGjhuqC.jpg";
  Jae = loadImage(imageURL);
}

function setup() {
  createCanvas(480, 480);
  background(255);
  frameRate(10000);
  Jae.loadPixels();  
  Jae.resize(480,480);
}

function draw() {
  
 var x = random(width);
 var y = random(height);
  
 var ix = constrain(floor(x), 0, width);
 var iy = constrain(floor(y), 0, height);
  
 var clr = Jae.get(x, y);
 var mouseclr = Jae.get(mouseX, mouseY);
  
//fill and color pixels with rectangle
 noStroke();
 fill(clr);
 rect(x,y,10,10);
  
//draw and color text "LA" at my mouse location
 fill(mouseclr);
 textSize(16);
 textStyle(BOLD);
 text("LA",mouseX,mouseY);
}

Looking Outwards 09: on Looking Outwards

Looking Outwards 09: on Looking Outwards

Looking at other students’ looking outwards posts, I found the looking outwards 06: randomness post by the username “catbug” interesting. The work he/she talks about it Robbie Barrat’s Neural Network Balenciaga series. Barrat produced a random image by analyzing the similarities in thousands images from Balenciaga runway and interpret the patterns in those. I agree with him/her that it is very interesting and admirable that this project throws the whole concept of randomness into question; that they are series of randomly generated images yet look so similar to each other and look so consistent in the style. I wonder if it is a similar concept to the average. Analyzing thousands of images of Balenciaga runway and lookbook may have allowed the algorithm/system to find out the patterns in the clothes and find out the “average” of the aspects of the Balenciaga style and that led to generating the most “Balenciaga” images.

https://flaunt.com/content/ai-fashion

LO 09: Anthony Prestigiacomo

Author: Anthony Prestigiacomo
Assignment: Looking Outward 03
Artwork: Probability Lattices
Artist: Marius Watz
Year: 2012

I agree with Anthony that the 4 pieces created are all quite unique, but similar in a very interesting way. The sharpness of the edges created by the angles give an interesting appearance to each individual sculpture. I would be interested to see what the parametric functions looked like to create the art pieces. Also, as the piece was created in 2012, the 3D filament is quite apparent. I would be interested to see how complex Watz could make these art pieces with today’s technology. 3D printers are much better at not leaving lines as well as can create more complex structures. I agree with Anthony that the artist relies on abstractionism which gives his artwork the feel that it does. On top of that, the Watz manages to reduce the abstractness with computation. The ties between the two gives the art its appeal which I imagine is quite difficult to create.

http://mariuswatz.com/2012/05/09/probability-lattice/

Marius Watz | Artist archive

Project 09 – Portrait

I wanted to create a replication of the portrait that could be either detailed and accurate or abstract. To do this I made my image get created by squares and circles that are created by a loop. The size gets changed by the x-position of the mouse (left is less abstract and right is more abstract).

sketchDownload
//function that loads image of my face
function preload() {
    lucas = loadImage("https://i.imgur.com/M9dRkNS.png");
}

function setup() {
    //canvas is the size of the resized image
    createCanvas(850/2.29, 480);
    background(0);
    //stores pixels from the image
    lucas.loadPixels();
    //resizes image to keep proportions
    lucas.resize(850/2.29, 480);
    frameRate(100);
}

function draw() {
    //changes position of the circles and squares in the array
    var modifier = 10;
    //constrains the size of the circles and squares
    var restrict = map(mouseX, 0, width, 5, modifier*2);
    for(var i = 0; i < width; i++){
        for(var j = 0; j < height; j++){
            //obtains the pixel color at a given x and y of the picture
            var pixelColor = lucas.get(i*modifier, j*modifier);
            noStroke();
            //fills with the color from the pixel
            fill(pixelColor);
            //creates circles and squares that will replicate the image
            circle(i*modifier, j*modifier, random(restrict));
            square(i*modifier, j*modifier, random(restrict));
        }
    }
}

Looking Outwards – 09

Tree Growth by Her Thorp, 2006

“Tree Growth” is a very simple piece that I find really intriguing. Like Alyssa mentions, the process of painting a tree comes down a lot to muscle memory and random brushstrokes to give it enough “noise” to be lifelike. This program does the exact same thing, replicating the process of painting or growing a tree through computational means.

The leaves even change color by the seasons! The piece, fundamentally, is simulating natural growth within the confines of code. By roughly replicating the natural process, the piece takes the first step towards growing a “real” digital tree.

-Robert