Lan Wei-Project-02-Variable-Face

sketch

var facePink = 20;
var eyeW = 50;
var eyeH = 7;
var eyebrowH1 = 270;
var eyebrowH2 = 270;
var mouthH = 355;

function setup() {
    createCanvas(640, 480);
    background(255, 196, 238);
    strokeWeight(3);
}

function draw() {
    //hat
    fill(196, 42, 42);
    stroke(196, 42, 42);
    ellipse(300, 260, 205, 195);

    //quilt
    ellipse(300, 570, 320, 500);
    stroke(232, 139, 139);
    push();
    strokeWeight(40);
    beginShape();
    curveVertex(240, 350);
    curveVertex(240, 290);
    curveVertex(230, 370);
    curveVertex(350, 440);
    curveVertex(360, 470);
    curveVertex(350, 500);
    curveVertex(330, 600);
    curveVertex(330, 700);
    endShape();
    pop();

    //face
    fill(250, 240, 200);
    stroke(250, 240, 200);
    beginShape();
    curveVertex(220, 100);
    curveVertex(220, 240);
    curveVertex(230, 350);
    curveVertex(300, 400);
    curveVertex(370, 350);
    curveVertex(380, 240);
    curveVertex(380, 100);
    endShape();
    push();
    fill(232, 169, 132);
    stroke(232, 169, 132);
    ellipse(250, 360, facePink, facePink);
    ellipse(350, 360, facePink, facePink);
    pop();

    //eyebrow
    stroke(0);
    push();
    strokeWeight(5)
    line(230, eyebrowH1, 270, eyebrowH2);
    line(370, eyebrowH1, 330, eyebrowH2);
    pop();

    //eye
    line(220, 320, 270, 330);
    push();
    translate(350, 325);
    fill(255);
    strokeWeight(2);
    rotate(radians(-7));
    ellipse(0, 0, eyeW, eyeH);
    strokeWeight(3);
    ellipse(-2, 0, 5, 5);
    pop();

    //mouth
    fill(250, 70, 70);
    stroke(250, 70, 70);
    triangle(300, mouthH, 293, 375, 307, 375);
    fill(255);

    //hair
    fill(0);
    stroke(0);
    quad(220, 241, 170, 330, 230, 370, 230, 350);
    quad(380, 241, 370, 241, 370, 370, 450, 330);

    //hat part 2
    fill(207, 71, 71);
    stroke(207, 71, 71);
    ellipse(300, 247, 175, 45);
}

function mousePressed() {
    // when the user clicks, these variables are reassigned
    // to random values within specified ranges. For example,
    // 'faceWidth' gets a random value between 75 and 150.
    facePink = random(15, 30);
    eyeW = random(45, 52);
    eyeH = random(7, 40);
    eyebrowH1 = random(250, 270);
    eyebrowH2 = random(265, 285);
    mouthH = random(350, 370);
}

It’s fun to add dynamic effect to an image with randomness. And I find the mousePressed() function very useful to interact with audiences.

Yoo Jin Shin-Project-05-Wallpaper

Project-05

// Yoo Jin Shin
// Section D
// yoojins@andrew.cmu.edu
// Project-05-Wallpaper

var ellipseSize = 8;
var rectSize = 8;
var R = 120;
var G = 50;

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

function draw() {
	background(191, 166, 149);
	for (var y = height / 2.4; y < height; y+=35) {
		for (var x = 20; x < width; x += 50) {

			// rectangles
			fill (R, G, 50);
			noStroke();
			rectMode(CENTER);
			rect(x, y, rectSize, rectSize);

			// circles
			fill(230, 212, 200);
			stroke(R, 52, 52);
			strokeWeight(2);
			ellipse(x, y, ellipseSize, ellipseSize);

			// lines
			stroke(255);
			strokeWeight(0.5);
			line(x, 0, x, height);

			stroke(255);
			strokeWeight(0.5);
			line(x - 3, 0, x - 3, height);

			stroke(255);
			strokeWeight(0.5);
			line(x + 3, 0, x + 3, height);

			ellipseSize += 0.15;
			rectSize += 0.3;
			R -= 0.7;
			G += 0.8;
		}
	}
}

I was looking at the plain, default curtains in my dorm room and was inspired to create this design. I used the original taupe color as the base and tried to make it more interesting by adding geometric shapes (circles and squares) with gradient color changes. I tried to prevent making the design seem too congested so I started the shapes from around mid-height. I stuck with a more, toned down, deep color palette to match with the upcoming fall season. Throughout this process, I thought it was really difficult to create a design that I would actually purchase. Even though my intention was to amp up my plain curtains, I’m unsure whether I would choose this over the original. Perhaps this will be more suitable for another purpose, not curtains.

Lan Wei-LookingOutwards-05

The project is called When Leaving Becomes Arriving and the video is an excerpt of it. It was done by Rebecca Ruige Xu (Director/ Computer Graphics),  Sean Hongsheng Zhai (Computer Graphics) and Nicolas Scherzinger (Music) in 2015. The softwares used are Processing and Max/MSP.

What fascinates me of the project is that the graphic style is like a pencil painting on paper but the effect is with depth in it. Maybe because of my architecture background, the spatial effects in computer graphics always interest me a lot. The dynamic effect is also very successful with the patterns popping up and fainting away. The graphic has some relationships with the music but I feel like it also has its own logic. So I guess the graphic has some parameters controled by the music and at the same time has randomness.

Screenshot of the project
Screenshot of the project

Yoo Jin Shin-LookingOutwards-05

Tentacle Tower

Tenacle Tower (2005) by Yoichiro Kawaguchi

Tenacle Tower by Yoichiro Kawaguchi is a mixed-reality work that “represents the growing visual impact of lenticular 3D imaging.” The dimensions of this work is 1 m x 1 m x 1.8 m and was displayed along the wall in Kawaguchi exhibition, SIGGRAPH 2005: Threading Time. This image seems to play with people’s abilities to shift perspectives when viewing images—at times it seems like there is movement downwards, but at other times it seems to draw you into the image. It also seems futuristic due to the chrome-like theme, and looks like something one may encounter in a sci-fi movie. This image is composed of repeating elements (like pattern and color), but also varying ones (like size and angles) that were probably incorporated into the algorithm to produce this piece.

Han Yu Looking Outwards 05

Trailer for The Maze Runner from Youtube

The project I chose to write about this week is from a movie called The Maze Runner. The movie had numerous computer generated art but the one I want to discuss about is the wall. There is no way that such a huge wall can be an actual movie prop so we can safely assume that it is computer generated. Regarding the wall, admire its sheer scale and realism. There’s engraved tally marks, names on the wall to elaborate the detail of the wall. I admire these traits because I think it’s not too extreme and in your face, but still plays an important role in the movie. Regarding the algorithms generated, I think that they used the for loop because of the wall’s repeating elements. Also I think that they used a green screen to overlay the wall in a studio. So that would be similar to calling a function in a function. The creator’s artistic sensibilities come into the final form because he has a very clear understanding of the wall and its role. The wall is simple in nature. Its goal is to protect the people from the elements. But the wall’s secret is that it contains dangerous monsters. I think this classic irony is the epitome of art. 

Han Yu Project 05 Wallpaper

sketch

// Han Yu
// Section D
// hyu1@andrew.cmu.edu
// Project 05

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

function draw() {
	background(184,233,230);
	// passion fruits
	for (var i=50; i<width-10; i+=100) {
		for (var j=50; j<width-10; j+=100) {
			noStroke();
			fill(27,179,111);
			ellipse(i, j, 70, 70);
			fill(122,196,36);
			ellipse(i, j, 60, 60);
			fill(234,40,95);
			ellipse(i, j, 55, 55);

			// seeds
			stroke(88,88,90);
			strokeWeight(4);
			point(i-13,j-3);
			point(i+5,j-8);
			point(i,j-13);
			point(i-10,j+9);
			point(i+1,j+10);
			point(i+13,j+4)
			point(i+1,j+1)
		}
	}

	//eaten parts
	for (var y=0; y<7; y+=1) {
		
		if (y%2==0 & y!==0) { // only on even rows
			for (var x=0; x<7; x+=1) {
				if (x%2==0) { //only on even columns
				noStroke();
				fill(184,233,230);
				rect(x*100+100, y*100-100, 50, 50, 5);
				}
			}
		}
	}

	noLoop();
}

Watermelon is my favorite fruit. It was fun to make a wallpaper full of watermelons. To add more variations, I covered up some parts of the watermelons on a few locations. Overall, I found this project very helpful for practicing nested loops.

Lan Wei-Project-05-Wallpaper

my-sketch.js
>sketch

/* Lan Wei
Section D
lanw@andrew.cmu.edu
Project 05
*/

function setup(){
    createCanvas(600, 600);
    background(0);
}

var gap = 20; //vertical distance between two waves
var dens = 20; //horizontal density of the waves
var waveRev = 4; // control how big the wave is

function draw(){
    //draw ocean
    var i = 0;
    for (var y = -gap; y < height - gap; y += gap){
        noFill();
        stroke(255);
        beginShape();
        i ++; //will be used for color setting
        for (var x = -50; x < width + 50; x += dens){
            y += random(-gap/waveRev , gap/waveRev );//wave
            curveVertex(x, y);
        }
        curveVertex(width, height);
        curveVertex(0, height);
        curveVertex(0, y - gap/waveRev);//just to find a point to close the shape
        var blue = map(y, 0, height, 255, 30);
        var green = map(y, 0, height, 220, 10);
        fill(50, green, blue);
        noStroke();
        endShape();
    }
    noLoop();
    drawFish();
}

//draw fish pattern
function drawFish(){
    var dist = 100; //horizontal distance between fish
    var level = 70; //vertical distance between fish
    i = 0;
    for (var x = dist; x < width; x += dist){
        i ++;
        if (i % 2 == 0){
            for (var y = level; y < height; y += level){
                fish(x, y);
            }
        }
        else{
            for (var y = level * 1/2; y < height; y += level){
                fish(x, y);
            }
        }
    }
}

//how the fish looks like
function fish(x, y){
    var fishW = 30;
    var fishH = 10;
    var tailL = 10;
    fill(240, 230, 140);
    ellipse(x, y, fishW, fishH);//body
    fill(0);
    ellipse(x-10, y, 5, 5);//eye-black part
    fill(255);
    ellipse(x - 9, y, 1.5, 1.5);//eye-white part
    fill(255, 215, 0);
    triangle(x + fishW/2, y, x + fishW/2 + tailL, y + 5, x + fishW/2 + tailL, y - 5);
    //tail
}

My initial idea was to create a scene of different depth of the ocean. I want to make the waves of some randomness and change the color to show depth difference. After I finished the waves, I added some fish to fulfill the project requirement, and surprisingly the effect is very good. What I feel the most helpful through the project is that I get  familiar with ‘helper functions’ and practiced to create shape with irregular curves.

The sketch I did before draw in P5.js
How the wallpaper looks on a hoody.

Project – 05 – Wallpaper

sketch

function setup() {
    createCanvas(400, 600);
    background(0);

}
var squareSize = 80

var bSO = squareSize * (1/8)
var wLO = squareSize * (3/8)
var cr = squareSize * (2/10)
var obl = 5

function TSquare(x,y,w,h) {
    // Red Squares background of grid
    fill(148,3,3)
    stroke(0)
    strokeWeight(4)
    rect(x,y,w,h)

    // White line back 
    stroke(255)
    strokeWeight(5)
    line(x-obl, y-obl, x+w, y+h)

    // Blue square rounded corner transparent
    noStroke()
    fill(0, 0, 100, 200)
    //tint(255,127)
    rect(x+ bSO, y + bSO, w-(2 * bSO), h-(2 * bSO), cr, 0, cr, 0)

    // White line foreground   
    stroke(255)
    strokeWeight(5)
    line(x+30, y+30, x+w-30, y+h-30)

    //foreground black grid
    noFill()
    stroke(0)
    strokeWeight(4)
    //rect(x,y,w,h)

}

function draw() {
    for(xi=0; xi<width; xi = xi + squareSize){
        for(yj=0; yj<height; yj = yj + squareSize){
           
           TSquare(xi, yj, squareSize, squareSize)
        }
    } 

}

My inspiration for the start of this project was a plaid pattern. As I set out to attempt to recreate it, I made an error that ended up creating a very interesting novel pattern. I then riffed off of this new creation messing around with the alpha function which controls transparency. The pattern is a square of width and height 80 pixels iterated over x and y using for loops.

Lan Wei-LookingOutwards-04

The project has a very profound inspiration, which is the thinking about the universe asnd life. I admire the appalling visual effect as well as the harmonious match of the graphic and the music. The graphic does follow the flow of the music and push people to think about life and the universe using their own imagination. I don’t know much about the algorithms behind but I guess the designer makes use of the music volume and tone to generate random graphic within certain logical frame, and thus what we see is well-designed but not repetitive at all.  The creator’s artistic sensibilities is well shown in the dynamic movement of the grapic. The centrol idea of the universe of the designer is that it forms and reforms in an endless pattern, which is reflected in the transformation of shapes and the seeming randomness.

https://www.creativeapplications.net/maxmsp/multiverse-the-eternal-birth-and-death-of-infinite-parallel-universes/

Lan Wei-Project-04-String-Art

my-sketch.js
In the project I tried to create the sence of space by creating layers of different properties. And by adding the balls on the strings, I attempt to create a dynamic feeling in the still graphic.

function setup() {
    createCanvas(400, 300);
    background(0);
}

function draw() {
    //back lines
    for (var y1 = 0; y1 < height; y1 += 7){
        stroke(0, 0, 120);
        strokeWeight(0.1);
        line(0, y1, width, y1)
    }

    //draw the top-down curves
    x1 = 0;
    x2 = width;
    y2 = 0;
    for (var y1 = 0; y1 < height - 50; y1 += 10){
        x2 -= 20;
        stroke(150);
        strokeWeight(0.1);
        line(x1, y1, x2, y2);
    }

    //draw the first part of the curves
    x1 = 0;
    x2 = 0;
    y2 = height;
    for (var y1 = 0; y1 < height - 70; y1 += 10){
        x2 += 40;
        stroke(255);
        strokeWeight(0.3);
        line(x1, y1, x2, y2);
    }

    //draw the second part of the curves
    x2 = width;
    y2 = height - 50;
    for (var y1 = height - 70; y1 < height + 100; y1 += 10){
        y2 += 3;
        stroke(255);
        strokeWeight(0.5);
        line(x1, y1, x2, y2);
    }

    //balls
    fill(3, 168, 158);
    noStroke();
    ellipse(300, 215, 15, 15);

    //draw the red curves
    y1 = height;
    y2 = height;
    for (var x1 = 0; x1 < width; x1 += 10){
        y2 -= 20;
        stroke(150, 20, 0);
        strokeWeight(0.5);
        line(x1, y1, x2, y2);
    }

    //balls
    fill(3, 168, 158);
    noStroke();
    ellipse(120, 200, 50, 50);
    ellipse(30, 100, 30, 30);
    ellipse(310, 90, 60, 60);
    ellipse(420, 200, 100, 100);
}