cmhoward-project-08

click me!

cmhoward-09

var img;

//decalre initial gridsize
var gridSize = 50

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

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

function draw() {
    for (var x = 0; x < width; x += gridSize) {
        for (var y = 0; y < height; y += gridSize) {
            //rectangle color
            var theColorAtLocationXY = img.get(x, y);
            fill(theColorAtLocationXY);
            noStroke();
            //array squares in grid
            rect(x, y, gridSize, gridSize);
        }
    }
}

function mouseClicked() {
    //make grid size smaller when user clicks
    gridSize -= 1
    //reset gridSize
    if (gridSize < 5) {
        gridSize = 50;
    }
}

For this project, I wanted to create a pixel grid that becomes smaller and thus, clearer as the user clicks!

The  beginning image:

The final rendering:

I wanted the image to stop at a certain resolution so it maintains the pixelation effect, so it resets after a certain amount of clicks.

Lan Wei-Project 09-Portrait

my-sketch.js

//Lan wei
//lanw@andrew.cmu.edu
//Section D
//Project-09

var img;
var url;
function preload() {
    url = "https://i.imgur.com/LwxpUPT.jpg";
    img = loadImage(url);
    frameRate(10);
}

function setup() {
    createCanvas(300, 400);
    background(255);
    img.loadPixels();
}

function draw() {
   var x = floor(random(img.width));
   var y = floor(random(img.height));
   push();
   translate(x, y);
   var col = img.get(x, y);
   stroke(col);
   strokeWeight(map(brightness(col), 0, 100, 3, 1)); //line weight depending on brightness
   var length = map(brightness(col), 0, 100, 25, 5); //line length depending on brightness
   rotate(random(0, PI));
   line(- length/2, 0, length/2, 0);
   pop();
}

My idea is using lines to create the abstract portrait. To emphasize the human figure instead of the dark background, and also to make bright areas look brighter, I made the lines in areas with smaller brightness thicker and longer. I think it would look nicer if I choose a picture with more color changes.

Process effect

Min Jun Kim- Project 9 Portrait

Image gets clearer over time!

/*
Min Jun Kim
minjunki@andrew.cmu.edu
15104-B
Project 9
*/

var img; //sets the variable for the image to go into

//loads the image into the program
function preload() {
    img = loadImage("https://i.imgur.com/kt8Qs81.jpg");
    
}

function setup() {
    createCanvas(365, 480);
    background(250);
    //loads the pixels and sets the frame rate
    img.loadPixels();
    frameRate(10000000)
    
}

var dec = 0 //variable in which the decrease the size
var increment = 0.01 // the rate of decreasing
var scaley = 0.2 //scales the image

function draw() {
	//variable that moves the pixels
	var randaddx= random(200)
	var randaddy= random(200)
	//variable that determiens the size of pixels
	var randsize = random(30-dec)
	
	//scales the image down
    scale(scaley,scaley)
    noStroke()
    //draws starting points on canvas
    for (i = 0; i < height*1/scaley; i += 100) {
    	for (x = 0; x < width*1/scaley; x += 100) {
    		//finds the color
    		var c = img.get(x+randaddx, i+randaddy);
    		//sets pixel = to color
    		fill(c);	
    		//draws the pixels
    		rect(x+randaddx,i+randaddy,randsize,randsize)
    	}
    } 
    //makes it so that image gets more clear over time
    dec += increment
    if (dec > 25) {
    	increment =0 
    }
    
}

I wanted my pixel portrait to load fast and be rather accurate, so I used for loops to draws initial starting points of the canvas then used random values to move the points in order to draw the canvas. Initially, I increased the for loop variables by a low number of 20, which resulted in the picture loading too fast and too accurately, which defeated the point of the pixel art. So I set up a parameter where the size of the pixels decreased over time. This way there are less gap points (because the starting size is big) and adds an interesting layer to the whole piece.

Process:

original photo credits to my gf

Process 1
program about 30 seconds in

Eunice Choe – Project-09 – Portrait

sketch

/*Eunice Choe
Section E
ejchoe@andrew.cmu.edu
Project-09*/

var underlyingPic;

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

function setup() {
    createCanvas(320, 480);
    background(200, 100, 107);
    underlyingPic.loadPixels();
}

function draw() {
    var px = random(width);	//random y within width
    var py = random(height);	//random x within height
    var iX = constrain(floor(px), 0, width-1);
    var iY = constrain(floor(py), 0, height-1);
    //extracting color from base image
    var colorAtXY = underlyingPic.get(iX, iY);
    noStroke();
    fill(colorAtXY);
    // ellipses with random widths and heights fill canvas
    ellipse(px, py, random(1, 10), random(1, 10));

   	// when the mouse moves across canvas, rectangles of random
    // sizes will follow the mouse
    var colorAtMouse = underlyingPic.get(mouseX, mouseY);
   	fill(colorAtMouse);
    noStroke();
   	rect(mouseX, mouseY, random(3, 6), random(3, 6));
   }

function mousePressed(){
    // when mouse clicks, the name "sophia" appears on mouse location
    // with base image colors
    var colorAtXY = underlyingPic.get(mouseX, mouseY);
    textSize(20);
    text("sophia", mouseX, mouseY);


   }

My project reveals an image of my friend Sophia through ellipses of random widths and heights. Also, someone can use the mouse to speed up the image reveal because there is a trail of rectangles that follow the mouse’s location. Another fun element I added was showing Sophia’s name when the mouse is clicked on the canvas. Overall, this project was fun to complete because of its personal significance to me. Going forward, I am excited to see how I can represent more images computationally.

This screenshot shows the start of the image reveal, the trail of rectangles, and the “sophias” that appear when clicked.
The final image that appears.
The original image.

Vicky Zhou – Looking Outwards – 09

For this week’s looking outwards post, I found my fellow peer, Jason Zhu’s Looking Outward from week 1 quite interesting. The project he discussed is Colorspace, “an interactive sculpture that translates text messages into breathtaking animations of colored light.” He pointed out that this kind of interactive space could be used in “spaces where users have a lack of or no emotional connection to, but spend a significant portion of their time”, and/or schools and and workplaces. My main question would be though, aside from creating an interest for the first couple of interactions, how else could this environment be beneficial? For example, instead of just creating a sense of community and momentary interest, could this kind of interactive digital media be used to facilitate learning, if placed in a school environment, or help engage productivity, in placed in a work environment? In addition, I personally thought of a hospital, when Jason mentioned placing this installation in a space where people typically do not feel as connected and/or emotional to, and if that could possibly shift the user into having a more positive experience.

Tanvi Harkare – Project 09 – Portrait

tanvi09

/* Tanvi Harkare
tharkare@andrew.cmu.edu
Section B
Project-09*/

var img;
var ix;
var iy;
var px;
var py;
var sizeC = 10;
var colAtLoc;

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

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

function draw() {
    //x and y locations for ellipses
    px = int(random(0, 480));
    py = int(random(0, 480));
    //saving x and y locations of mouse
    ix = mouseX;
    iy = mouseY;
    //colors for circle and text
    colAtLocCircle = img.get(px, py);
    colAtLocText = img.get(ix, iy);
    //drawing text based on mouseX and mouseY
    noStroke();
    fill(colAtLocText);
    textSize(6); 
    text("PK", ix - 3, iy + 3); //so mouse is in center of text
    //setting random size and drawing circles
    randomSize();
    fill(colAtLocCircle);
    ellipse(px, py, sizeC, sizeC);
}

function randomSize(){
    sizeC = int(random(0, 10));
}

For this project I chose a picture of my friend Prerana that I took myself last year! Circles appear on the canvas in a random order, and also vary in size because of the randomSize function. In addition to the points, if you run the mouse over the canvas, her initials appear in the color of wherever the mouse position is located based off the image pixel color.

original photo
If the circles were set to the same size each frame
how the final image could potentially look

Vicky Zhou – Project 09 – Computational Portrait

sketch

/*Vicky Zhou
Section E 
vzhou@andrew.cmu.edu
Project-09-Computational Portrait*/


var maandpa;

function preload() {
    var myImage = "https://i.imgur.com/2z2nvGR.jpg";
    maandpa = loadImage(myImage); //image of my mom and dad 
}


function setup() {
    createCanvas(350, 370);
    background(140, 200, 200, 100);
    imageMode(CENTER);
    maandpa.loadPixels();
    frameRate(900);
}


function draw() {
    var x = 1;
    var y = 1;
    var xvel = random(1, 400); //random x to add to x position 
    var yvel = random(1, 400); //random y to add to y position 
    x += int(x * xvel);
    y += int(y * yvel);


    var pcol = maandpa.get(x, y); //getting pixel color 
    noStroke();
    tint(255, 100); //makes a white tint; half opacity 
    fill(pcol);
    var size = random(0, 10); //generating random ellipse sizes 
    ellipse(x, y, size, size);

    //creating chinese word for mom on mom's side 
    if (x >= 200 & x <= 350){
        tint(255, 150);
        textSize(random(0, 20));
        text("妈", x, y);
    }
    //creating chinese word for dad on dad's side 
    if (x >= 0 & x <= 200){
        tint(255, 150);
        var space = random(0, 30);
        text("爸", x + space, y);
    }
}





For this computational portrait project, I used a cool hip photo of my momma and papa from their ol’ days. I loved seeing other people manipulate different types of text and utilizing it as their generative pixels, and so I wanted to do the same but by using the Chinese word for “mom” and “dad” on their respective side of the image. I also included ellipses to add more to the background, because I did not like it as much with the gaps. Both text and ellipses are generated to have a certain tint, to create a better layering effect, and also are generate to be of varying random sizes.

Original Image:

Generative Image:

Lingfan Jiang – Looking Outwards 09

I looked through Kai Zhang’s posts. One of them talked about the making of Movie CGI Effects in Doctor Strange in 2016. The video attached is very interesting to look at. Here’s the link for that.

It is surprising that the process of CGI making is not all about 3D generated objects. A lot of the times it is a combination of 2D and 3D layers that make up the full imagery.

It is also amazing to see how much software is capable now. Being an architecture student myself, it is still really difficult for me to imagine rendering one frame of the movie. Although the process is a lot different from each other, the final product is still fascinating to look at.

I think in the original post, Kai really explained the process really well. For me, on the other hand, I am interested in what it means to have those amazing effects. First of all, being a Marvel movie, Doctor Strange is a movie with great fighting scenes and fancy looks. However, with those effects, actors had to act based on their imagination and acting experience. As for the movies themselves, we like to watch these kinds of visual effects. In order to not let people feel bored, more and more money is invested to create better effects. As a result, the characters’ emotions become less important in those movies. They are definitely nice movies to watch, but normally we do not learn from them anymore.  Image result for doctor strange cgi

Here is the original post.

Kai Zhang-Looking Outwards-05

 

 

Jenna Kim (Jeeyoon Kim) – Project 09 – Portrait

jeeyoonk09

/* Jenna Kim (Jeeyoon Kim)
Section E
jeeyoonk@andrew.cmu.edu
Project 9: Portrait
*/

//GLOBAL variable for the IMAGE
var jen;

// preloading image ON THE CANVAS
function preload() {
    jen = loadImage("https://i.imgur.com/gvGuJiN.jpg?1"); 
}

function setup(){
	//canvas setting
	createCanvas(600, 400);
	background(255);
	jen.loadPixels(); //draw image
	noStroke();
	imageMode(CENTER);
	frameRate(150);
} 
function draw(){
	// starting from the first half of the page and then the left
	var jx = random(width);
	var jy = random(height);
	//constraining to canvas
	var jjx = constrain(floor(jx), 0, width - 15);
	var jjy = constrain(floor(jy), 0, height - 15);
	//picking color from the image
	var C = jen.get(jjx, jjy);

	//drawing rectangular pixels
	noStroke();
	fill(C);
	rectMode(CENTER);
	rect(jx, jy, random(5, 10), random(5, 10));

	//when mouse is pressed, pink circles are created
	if (mouseIsPressed){
		noStroke();
		fill("pink");
		ellipse(jx, jy, 5, 5);

	}
}

For this project, I used a portrait of my friend Jenny. I randomized simple rectangular forms to complete Jenny’s portrait. Looking at others’ portraits and trying different codes for my project, I was amazed by how many variations you can use to create a
pixelated portrait. When you click on the screen, pink circles come up because I personally like the pink sky in the back and I wanted the pink color to show up on other parts of the portrait too. It’s fun to look at the pink circles disappear as more rectangular shapes show up.

original photo

middle process
What it’s supposed to look like as the forming of portrait goes to end

Victoria Reiter – Looking Outwards – 09

This week I looked at the Looking Outwards post of my classmate Samantha (October 5th, 2018), from her Week 6 Looking Outwards post. In this post, she reviews the Randomly Generated Insect Species project created by Chaotic Atmospheres, specifically Geneva-based artist Istvan.

The Cloaked Chrysalid, insect designed by artist Istvan

Istvan created several species with distinct characteristics, such as a certain number of legs, wings, etc. as the basis for his insects, then adjusted parameters on deformers to allow for the variations between species.

The Longhorn Mismisa

I think his project is interesting because all his insects, although distinct, follow a similar aesthetic style, making them look like they really do all come from some like alternate planet…or DIMENSION.

I also found out that he posts his insects as trade-able art trading cards on the website NeonMob, which I thought was really cool!

A bio on Istvan can be found here.