amui1-Project-09-Portrait

amui1-p9

//Allison Mui
//15-104 Section A
//amui1@andrew.cmu.edu
//Project-09

//variables for image
var portraitImg = "https://i.imgur.com/UMgur46.png";
var portrait;

//list of random words
var words = ["cat","dog", "bun", "sun", "pot",
            "pen", "bot", "run", "fill the screen"];
var idx;
var word;

//variables for random coordinates
var px;
var py;


function preload() {
    //loads image into portrait variable
    portrait = loadImage(portraitImg);
}

function setup() {
    createCanvas(431,480);
    background(0);

    //variables for starting positions
    tpx = 30;
    tpy = 30;

    //identifies random word in word list
    fill(255);
    //stores length of array
    var length = words.length
    //picks random index in array
    var idx = int(random(0,length));
    //stores random word
    var word = words[idx];
    //displays random word
    text(word,width-100,380);

    //draw game like structure
    stroke(255);
    //border line
    line(0,400,width,400);
    fill(139,0,0)
    noStroke();
    //slight 3d effect
    ellipse(width/2-116,443,40,40);
    ellipse(width/2+124,443,40,40);
    fill(255,0,0);
    noStroke();
    //red buttons
    ellipse(width/2-120,445,40,40);
    ellipse(width/2+120,445,40,40);

    //loads picture pixels
    portrait.loadPixels();
}

function draw() {
    //shows timer
    fill(255);
    //if 900 frames already passed, show time alert
    if (frameCount == 500) {
      text("60 seconds left", 30, 380);
    }
    //if 1800 frames already passed, show game over alert
    if (frameCount >= 800) {
      frameRate = 60;
      fill(255,0,0);
      text("Game Over", width/2-30,380);
      //if game is over randomize locations
      px = random(0,width);
      py = random(0,height-150);
      var randomColor = portrait.get(px,py);
      fill(randomColor);
      //place circles in random locations to show the underlying picture
      ellipse(px,py,4,4);

    }

    stroke(0);

    //tfactor represents the number circle in the row
    var tfactor = 0;
    //run 8 circles/times
    for (t = 0; t < 8; t++){
      var tportraitColor = portrait.get(tpx+tfactor,tpy);
      fill(tportraitColor);
      //draw circle for the row
      ellipse(tpx+tfactor,tpy,6,6);
      tfactor += 6;
    }
    // if game is not over, allow user to move row
    if (frameCount < 800) {
      if (keyIsDown(LEFT_ARROW)) {
        tpx -= 5;

      }
      if (keyIsDown(UP_ARROW)) {
        tpy -= 5;

      }
      if (keyIsDown(DOWN_ARROW)) {
        tpy += 5;

      }
      if (keyIsDown(RIGHT_ARROW)) {
        tpx += 5;

      }
    }
    //create boundaries
    if (tpx > width - 1) {
      tpx = width-5;
    }
    if (tpx < 1) {
      tpx = 1;
    }
    if (tpy > height - 150) {
      tpy = height-150;
    }
    if (tpy < 1) {
      tpy = 1;
    }
}

I thought this project was rather difficult. I had a lot of ideas in mind and struggled with liking my final product. However, I became inspired by a childhood toy “etch-a-sketch”. So the idea behind my project, is a random word is generated which you have to try to write before the timer runs out.

Caption: Above are different states of the project. Below is a picture of the toy I was referring to.

 

Disclaimer: the page will move up and down if you press the keys as well.  This was not intended. :/

jiaxinw-Project 09-Computational Portrait

sketch

function preload() {
    img = loadImage("https://i.imgur.com/rHE8Y7e.jpg");
}

function setup() {
    createCanvas(480, 630);
    background(30);
    img.loadPixels();
}

function draw() {
    // pick x,y randomly from the image
    var x = floor(random(img.width))
    var y = floor(random(img.height))
    // set random values for creating irregular shapes
    var rw = random(5,20);
    var rh = random(2,15);
    //get color from x,y point of the image
    var pcolor = img.get(x,y)
    //fill irregular shapes with the x,y point color
    fill(pcolor)
    stroke(255,40)
    quad(x,y,x+rw,y,x+rw/2,y+rh,x,y+rh/1.5)
}

function mouseDragged(){
    //when mouse is dragged, keep drawing crosses 
    //and get color from the mouseX, mouseY point
    var dcolor = img.get(mouseX,mouseY);
    var l = 10;
    stroke(dcolor);
    line(mouseX,mouseY,mouseX+l,mouseY+l);
    line(mouseX,mouseY,mouseX-l,mouseY+l);
    line(mouseX,mouseY,mouseX+l,mouseY-l);
    line(mouseX,mouseY,mouseX-l,mouseY-l);

}


function mousePressed(){
    //when mouse is dragged, draw one cross 
    //and get color from the mouseX, mouseY point
    var dcolor = img.get(mouseX,mouseY);
    var l = 10;
    stroke(dcolor)
    line(mouseX,mouseY,mouseX+l,mouseY+l);
    line(mouseX,mouseY,mouseX-l,mouseY+l);
    line(mouseX,mouseY,mouseX+l,mouseY-l);
    line(mouseX,mouseY,mouseX-l,mouseY-l);
}

I wanted to use irregular shapes to “draw” the image, so I decided to use quad() and add random numbers to change the shapes randomly. Since I wanted to make the image become interactive, I used mousePressed() to make the image change when the mouse is clicked. The reason why I put crosses in the image since I thought about when I was a child, I liked to draw lines on pictures to “destroy” it. 🙂

abradbur – Project – 09

sketch

var myFace; //image of my face
var skeleton; //skeleton image
var currentImageIndex;

function preload(){
    //load my face and the skeleton
    myFace = loadImage("https://i.imgur.com/m10glof.jpg");
    skeleton = loadImage("https://i.imgur.com/9cviAOv.jpg");
    currentImageIndex = 0;
}

function setup() {
    createCanvas(360, 480);
    background(0);
    fill(218, 172, 75);
    textSize(50);
    text("We are all Skeletons Underneath", 50, 120, 310, 340);
    currentImage = myFace;
    currentImage.loadPixels();

}

function draw() {
    var px = random(width);
    var py = random(height);
    //keeps the color within the constraints of the image
    var ix = constrain(floor(px), 0, width);
    var iy = constrain(floor(py), 0, height);
    var col = currentImage.get(ix, iy); //color of the image
    strokeWeight(0.1);
    stroke(218, 174, 75);
    fill(col);
    //draw random triangles
    triangle(px, py, px + random(6, 12), py + random(-8, 8),
    px + random(6, 12), py);
    
    //just draw on the triangles if you're bored
    var mouseCol = currentImage.get(mouseX, mouseY);//color at the moouse
    stroke(mouseCol);
    triangle(mouseX, mouseY, mouseX + random(6, 12), mouseY + random(-8, 8),
    mouseX + random(6, 12), mouseY);
}

//flip between myFace and skeleton
//when you press the mouse
function mousePressed(){
    currentImageIndex = (currentImageIndex +1)%2;
    if (currentImageIndex === 0){
        currentImage = myFace;
    } else{
        currentImage = skeleton;
    }
}

For this project I decided to use my own face because I wanted to use a silly photo I’ve been unable to as of yet show the world. I also wanted to keep with the theme of the Halloween season and make something a little spooky. Random triangles pop up to make the image but if you click on it, instead of my face, a skeleton may begin to emerge. (Not actually my skeleton, all credit to Evil Sheila the skeleton in my High School art department, whom I love). I’d actually hoped to switch between shapes (triangles to circles) as well as images, but I couldn’t quite get it to work. So I settled.

Here are the original images I used.

Me
Evil Sheila

And here are some screen shots if you don’t want to sit through the creation process. (You can also use the mouse to speed things up)

A Spooky Truth
The Illusion
Spooky Reality

amui1- LookingOutwards-09

I chose to look at my friend, Katie’s, Looking Outwards for Week 8. She did her Looking Outwards on the Clouds Documentary.

Caption: The opening screen for the Clouds Documentary website. A kickstarter video for the project can be found below and at this website:

I liked how Katie referred to the project as “adding another dimension to the idea of marrying videography, design, and programming.” I strongly agree with this b/c this team figured out how to bring all of these mediums together to create an even more outrageous and innovative creation.

Caption : Visualization of Space Junk: One the interactive graphics that can be found on the cloud.

Caption: Visualization of a noise sphere: One of the interactive graphics found on the cloud.

Caption: Fernanda Viegas. One of the contributors to the cloud.

I chose this Looking Outwards because it also has some relation to what we are doing our project on this week: computational portraits. As you can see from the last photo, Fernanda is pixelating. The Cloud took into another level and pixelated a whole story. I think this project is really fascinating because of the mass amount of interdisciplinary contributors that helped bring this project forth.

 

 

danakim-Project-09

sketch

//Dana Kim
//danakim@andrew.cmu.edu
//Section D
// Project-09

var Image;
var initials = []; //my friends and my initials

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

function setup(){
  createCanvas(270, 480);
  Image.loadPixels();
}

function draw(){
  var initials = ["DK", "MC", "WYL"];
  var InitialsIndex = 0;
  var px = random(width); //x-coordinate of text
  var py = random(height);// y-coordinate of text
  var qx = constrain(floor(px), 0, width);
  var qy = constrain(floor(py), 0, height);
  var colorAtXY = Image.get(qx, qy);
  var colorAtMouse = Image.get(mouseX, mouseY);

  for ( var i = 0; i < initials.length; i++){
    InitialsIndex = i;

    //draws text with image color at randomized x and y-coordinates
    textSize(random(10,20));
    strokeWeight(random(3,6));
    fill(colorAtXY);
    text(initials[InitialsIndex], px, py);

    //draws text with image color at mouse x and y-coordinates
    textSize(random(10,20));
    strokeWeight(random(3,6));
    fill(colorAtMouse);
    text(initials[InitialsIndex], mouseX, mouseY);
  }
}

I used a picture of my friends and I that I took last winter. I used my friends and my initials to draw the image. The locations and who’s initials were drawn were randomized.

NatalieKS-LookingOutwards-09

I was browsing through the Looking Outwards posts for Week 7, because I was interested in learning about other examples of computational information visualization. One really interesting post I found was from my friend Christopher Reyes, which featured a short movie made by Red Bull in collaboration with design firm CLEVER°FRANKE and fashion brand Byborre.

I agree that this kind of constant visual feedback is engaging and effective. I can also see how it can positively influence clubgoers’ experiences, especially with the real-time animations being projected around them in the club. One of the aspects about this that I find notable is the fact that it’s sponsored by Red Bull. More and more big companies are branching out into these new forms of data visualization, and it’s exciting to see how each company is using these forms. Especially in this case, where the data, the clubgoers’ excitement, was being directly influenced by Red Bull’s products. It’ll be interesting to see how companies further manipulate and visualize data to reach broader audiences and achieve better marketing.

Here are videos of the original work:

Red Bull at Night x ByBORRE – The Sixth Sense – Case movie from CLEVER FRANKE on Vimeo.

Red Bull visualizations summary of screencast from CLEVER FRANKE on Vimeo.

heeseoc-LookingOutwards-09

I decided to reply to Joohee Kim’s post, about a generative art titled “Random Numbers,” created by generative artist Marius Watz and data artis Jer Thorp. I was browsing through all the posts she had made, and thought I like the look of the generated object, how the layers of lines create a dimension, and was curious about the algorithm behind it. In her post, Joohee describes about how she appreciates the randomness in this piece of artwork, and I also agree that this work has an interesting way of combining data and randomness, since those are the two contrasting ideas since data isn’t a thing that could be completely random. Also, the fact that the final piece was screen printed by hand gave it a bit more authenticity because it has a original yet unexpected quality to it since the outcome is not necessarily the same each time, and the concept of it is parallel to the “data and randomness” since they use the same exact frame for printing but the results come out as random.

https://creators.vice.com/en_us/article/vvzxkb/random-numbers-screen-printed-generative-art-nyc-event

LookingOutwards06-jooheek

heeseoc-Project-09-Portrait

sketch

//Steph Chun
//15-104 section #A
//heeseoc@andrew.cmu.edu
//Project-09

var img;

// load image
function preload() {
	var imageurl = "https://i.imgur.com/jYztupF.jpg";
  	img = loadImage(imageurl);
}

function setup() {
	createCanvas(500, 500);
	background(0);
	img.loadPixels();
	frameRate(20);
}

function draw() {
	
	//array for the letters that comes up in random sizes and position
	//which spells out the name of my roomate in order
	var name = [];
	name[0] = "j";
	name[1] = "o";
	name[2] = "o";
	name[3] = "h";
	name[4] = "e";
	name[5] = "e";

	//the position of the letters
	var x = random(width);
	var y = random(height);

	//assigning colors to the letters according to the pixel of the image
	var ix = constrain(floor(x), 0, width-1);
	var iy = constrain(floor(y), 0, height-1);
	var dotcolor = img.get(ix, iy); 

	//letters of random sizes that shows up constantly
	noStroke();
	fill(dotcolor);
	textSize(random(10, 30));
	text(name[frameCount%6], x, y);

	//text that follows the mouse
 	var mousecolor = img.get(mouseX, mouseY);
	fill(mousecolor);
	textSize(10);
 	text("I don't know man", mouseX, mouseY);

}

I made a portrait of my roommate, Joohee, out of the letters of alphabet in her name and the phrase that she uses a lot. I wanted to somewhat capture her personality through this project, by the photo I chose and the text in a more minimal way. Below are the original photo and different experiments that I’ve done, only with text.

LookingOutwards09-jooheek

Living Sculptures Series – Mike Campau

Hee Seo Chun’s Looking Outwards #5 Post

In this post, Hee Seo talks about a project series by Mike Campau where he creates portraits of different people using non-humanistic features generated from computer graphics. I agree with her in that it’s interesting how he uses non-humanistic features to personify a person by juxtaposing them next to humanistic features (like clothing, posture, etc.). I also think it’s interesting how these non-humanistic features can give this portrait character. It shows how you don’t always have to personify a person with a head, arms, body and legs. Also, the fact that this was generated on the computer and made to look very surreal is what makes this piece very compelling. By using non-natural ways of generating and non-natural features to create a “natural” subject, Mike Campau creates an interesting computational art series.

https://www.behance.net/gallery/19683165/LIVING-SCULPTURES-2

Three examples of the series

jooheek-Project09-ComputationalPortrait

sketch

//JooHee Kim
//Section E
//jooheek@andrew.cmu.edu
//Project09-ComputationalPortrait

//global variable for image
var susieImg;
var susieImgURL;

function preload() {
	//loading image
	susieImgURL = "https://i.imgur.com/ezOtPFw.jpg?1";
	susieImg = loadImage(susieImgURL);
}

function setup() {
    createCanvas(360, 480);
    background(255, 200, 200);
    //load image pixels
    susieImg.loadPixels();
    //at a frame rate of 30
    frameRate(30);
}

function draw() {

	//variables for drawing circles
	var pixelX = random(width);//for position of circles
	var pixelY = random(height);
	var imageX = constrain(floor(pixelX), 0, width-1);//position of image pixel that we need to get color from
	var imageY = constrain(floor(pixelY), 0, height-1);
	var pixelDiam = random(1, 20);//for size of circles
	var colorOfImgPixel = susieImg.get(imageX, imageY);//getting color of pixel at imageX & imageY

	//drawing circles positioned at random with random sizes
	//filled with color of pixel at that position
	noStroke();
	fill(colorOfImgPixel);
	rect(pixelX, pixelY, pixelDiam, pixelDiam);

	//drawing outlined circles at mouse position
	//with stroke outline color of pixel at mouse position

	var strokeEllipseSize = random(15, 25);
	var ellipseStroke = random(1, 5);
	var colorOfImgPixelAtMouse = susieImg.get(mouseX, mouseY);
	stroke(colorOfImgPixelAtMouse);
	strokeWeight(ellipseStroke);
	noFill();
	rect(mouseX, mouseY, strokeEllipseSize, strokeEllipseSize);
}

The portrait I used for this project is of my dear friend, Susie. I decided to make the image out of rectangles to kind of make it look very pixelated. I also made stroke rectangles following my mouse position so that there is a contrast of solid and outlined rectangles.

Original Photo of Susie
First stage
Second Stage