Project 05: Wallpaper

project-05-wallpaper
/*
Lauren Kenny
lkenny
Section A

This program draws a repeating geometric pattern.

*/

var x;
var y;
var circleX;
var circleY;
var circleX2;
var circleY2;

function setup() {
    noLoop();
    createCanvas(600, 600);
    background(0);
    noStroke();
    x=50;
    y=50;
    w=100;
    h=100;
    circleX=20;
    circleY=20;
    circleX2=80;
    circleY2=80;
}

function draw() {
    drawGrid();
}

//////////////////////////////
// THIS CREATES THE CIRCLES
/////////////////////////////
function drawBottomLeft() {
    fill(255, 0, 0);
    arc(x, y, w, h, HALF_PI, PI);
    fill(255, 255, 0);
    arc(x, y, w-50, h-50, HALF_PI, PI);
}

function drawBottomRight() {
    fill(0, 255, 0);
    arc(x, y, w, h, 0, HALF_PI);
    fill(0, 0, 255);
    arc(x, y, w-50, h-50, 0, HALF_PI);
}

function drawTopLeft() {
    fill(0, 0, 255);
    arc(x, y, w, h, PI, PI+HALF_PI);
    fill(0, 255, 0);
    arc(x, y, w-50, h-50, PI, PI+HALF_PI);
}

function drawTopRight() {
    fill(255, 255, 0);
    arc(x, y, w, h, PI+HALF_PI, 0);
    fill(255, 0, 0);
    arc(x, y, w-50, h-50, PI+HALF_PI, 0);
}

//////////////////////////////
// THIS CREATES THE TINY DOTS
/////////////////////////////
function drawTopCircles() {
    fill(0, 255, 0);
    circle(circleX, circleY, 5);
    circle(circleX+5, circleY-5, 5);
    circle(circleX-5, circleY+5, 5);
}

function drawBottomCircles() {
    fill(0, 0, 255);
    circle(circleX2, circleY2, 5);
    circle(circleX2+5, circleY2-5, 5);
    circle(circleX2-5, circleY2+5, 5);
}

//////////////////////////////
// THIS DRAWS THE REPEATING PATTERN
/////////////////////////////
function drawGrid() {
    //PURPLE DOTS IN BACKGROUND
    var d=5;
    var e=5;
    for (var o=0; o<width; o+=10) {
        for (var p=0; p<height; p+=10) {
            fill(80, 0, 195);
            ellipse(d, e, 8);
            e+=10;
        }
        e=5;
        d+=10;
    }

    //LARGE CIRCLES
    for (var i=0; i<width; i+=100) {
        for (var j=0; j<height; j+=100) {
            drawBottomRight();
            drawBottomLeft();
            drawTopLeft();
            drawTopRight();
            y+=100;
        }
        y=50;
        x+=100;
    }

    //WHITE OUTLINED CIRCLES IN FRONT
    var f=5;
    var g=5;
    for (var q=0; q<width; q+=10) {
        for (var r=0; r<height; r+=10) {
            noFill();
            stroke(255);
            strokeWeight(.35);
            ellipse(f, g, 10);
            g+=10;
        }
        g=5;
        f+=10;
    }

    //TINY GREEN DOTS
    var greenCounter=0;
    for (var k=0; k<width; k+=100) {
        greenCounter+=1;
        if (greenCounter%2==0) {
           circleY=120; 
        } 
        else {
            circleY=20;
        }
        for (var l=0; l<height; l+=200) {
            drawTopCircles();
            circleY+=200;
        }
        circleX+=100;
    }

    //TINY BLUE DOTS
    var blueCounter=0;
    for (var m=0; m<width; m+=100) {
        blueCounter+=1;
        if (blueCounter%2==0) {
            circleY2=80;
        }
        else {
            circleY2=180;
        }
        for (var n=0; n<height; n+=200) {
            drawBottomCircles();
            circleY2+=200;
        }
        circleX2+=100;
    }
}




I wanted to experiment with a geometric pattern and the arc() function we learned this week. I’ve been trying to get myself back up to speed with the unit circle, so I challenged myself to try and get the angles right on the first try rather than trial and error like I normally do. I found that when I really thought through the math and logic first, it was easier to write the program. I also wanted to experiment with some conditionals in my loops. After making my intended pattern, I added some extra loops just to give the visual more dimension.

Project 05 – Wallpaper

sketch.sl5Download
// Sarah Luongo
// sluongo
// Section A

function setup() {
    createCanvas(465, 465);
    background(84, 141, 155);
    noLoop();
}

function flower() {
    push();
    translate(74, 74);

    // Purple petals
    for (var i = 0; i < 4; i ++) {
        noStroke();
	fill(51, 0, 102);
	ellipse(0, -15, 15, 25);
	triangle(-6, -22.63, 6, -22.63, 0, -31);
	stroke(229, 204, 0);
	strokeWeight(1);
	line(0, -16, 0, -11);
	rotate(radians(90));
    }
    
    // Pink petals
    push();
    rotate(radians(45));
    for (var i = 0 ; i < 4; i ++) {
	noStroke();
	fill(255, 204, 204);
        ellipse(-20, 0, 40, 15);
	triangle(-34, -5.4, -34, 5.4, -45, 0);
	fill(0, 0, 255);
	circle(-9, 0, 2);
        rotate(radians(90));
    }
    pop();
    
    // Center of flower
    noStroke();
    fill(55, 24, 85);    
    circle(0, 0, 12);
    pop();
}

// Horizontal vines
function vinesH() {
    // Vines
    noFill();
    stroke(24, 129, 24);
    strokeWeight(2);
    bezier(1, 74, 15, 85, 25, 65, 40, 74);
    // Leaves
    noStroke();
    fill(24, 129, 24);
    ellipse(8, 72, 3, 9); // Left-most leaf
    ellipse(22, 79, 4, 10); // Center leaf
    ellipse(38, 69, 2, 7); // Right-most leaf
}

// Vertical vines
function vinesV() {
    // Vines
    noFill();         
    stroke(24, 129, 24);
    strokeWeight(2);                                    
    bezier(74, 1, 85, 15, 65, 25, 74, 40);
    // Leaves
    noStroke();
    fill(24, 129, 24);
    ellipse(72, 8, 9, 3); // Top-most leaf 
    ellipse(79, 22, 10, 4); // Center leaf
    ellipse(69, 38, 7, 2); // Bottom-most leaf
}

function draw() {
    for (var i = 0; i < 5; i++) {
        for(var j = 0; j < 5; j++) {
        push();
        translate(106*i, 106*j);
        vinesH();
        vinesV();
        flower();
        pop();
        }
    }
}

I wanted to do a floral pattern because I love flowers. I also really ran with the idea of creating something I would wear. I actually have a floral shirt with variations of pink flowers, and this is slightly based off of it. I normally draw flowers as I have created in this code (which you can see from the sketch below), and I wanted the multiple petals to make them all different colors. However, the colors I chose were different from the sketch because I didn’t have many pen options on my tablet, if I did they would have been the colors I choose in this code as they are all colors I love!

Looking Outwards-05

https://alteredqualia.com/three/examples/webgl_pasta.html

When looking for examples of 3D computer graphics, I found AlteredQualia’s website. This one project called WebGL Pasta caught my attention. It is a 3D rendering of pasta floating through space. The site is interactive, so if you move your mouse, you can explore the space and get it to move in different directions. What I find fascinating about this project, is the amount of depth they were able to achieve through the use of shadow, color, and movement. They were able to create this vast looking environment on a two-dimensional computer screen.

This project was built using WebGL (Web Graphics Library) which is a javascript API. WebGL allows for graphics to be rendered on the web, and it is something I’ve been quite interested in. This WebGL Pasta project seems to have been a creative exploration. I can see the artist’s attention to detail and ability to imagine vast environments. In a lot of their work they use this contrast of red and blue. I’m not quite sure why, but I would love to know their reasoning behind it.

Project 05: Wallpaper

The biggest challenge in this project was dealing with drawing the spines on the cactus. It turns out P5.js doesn’t really like nested loops in functions and it crashed the program when I tried to use it, so I had to do the inefficient solution of manually drawing the points.

cactus







function setup() {
    createCanvas(600, 600);
    strokeWeight(3)
   
   


}

function draw() {
for (x = 120; x <= width - 120; x += 120) {
    
    for (y = 120; y <= height - 120; y += 120) {
        
        createCactus(x, y, 60, 80)
    }
}
    
  




}

function createCactus(cactusx, cactusy, cactusw, cactush) { 
    push()
    rotate(radians(random(-PI * 2, PI * 2)))
    translate(cactusx,cactusy) 
    fill(35, 117, 67)
    ellipse(0, 0, cactusw, cactush)
    body()
    arms(45)
    flower()
    pop()
    noLoop()
    



}

function body() {
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      noLoop()


}

function arms (x) {
    push()
    translate(x,0)
    rotate(degrees(90))
    ellipse(0, 0, 20, 40)
    pop()
    push()
    translate(-x,0)
    rotate(degrees(230))
    ellipse(0, 0, 20, 40)
    pop()
    }

function flower() {
        noStroke()
        push()
        translate(0, -40)
        for (r = 90; r <= 270; r += 180) {
            rotate(degrees(r))
            fill(245, 110, 191)
            ellipse(0, 0, 10, 20)
            
        }

        pop()    
    }



    //// for (x = 0; x <= cactusw/2.75; x += 10) {
        //for (y = 0; y <= cactush/2.25; y += 10) {
             //point(x,y)
            
        //}
    //}
    ///for (x = -(cactusw/3); x <= 0; x += 10) {
        ///for (y = 0; y <= cactush/2.25; y += 10) {
             //point(x,y)
            
        //}
    //}
    //for (x = -(cactusw/3); x <= 0; x += 10) {
        //for (y = (-cactush/2.75); y <= 0; y += 10) {
             //point(x,y)
            
        //}
    //}
    //for (x = 0; x <= cactusw/2.75; x += 10) {
        //for (y = (-cactush/2.75); y <= 0; y += 10) {
             //point(x,y)
            
        //}
    //}

Project 5 Wallpaper

Continuing my exploration of abstracting puritst paintings of the architect Le Corbusier/ Charles Edouard Jeanneret. This week I decided to attempt to re-interpret some of the common motifs that occur in his paintings into the wall paper assignment. Purists paintings and cubist paintings alike require often require subtle differences in their repetitions of geometry to achieve their ambiguous depth and transparency, so reinterpreting them into a wall paper which inherently a tiled seamless graphic proved to be a difficult task.

sketch
//tjchen
//section A
function setup() {
    createCanvas(600, 600);
    background(220);
}

function draw() {
    scale(1);
    for ( var row = 0; row <= height; row += 80){
        for(var col = 0; col <= width; col += 80){
            tilebigger1(col,row);
        }
    }
    for ( var row = 40; row <= height; row += 80){
        for(var col = 0; col <= width; col += 80){
            tilebigger2(col,row);
        }
    }
}

function tilebigger1(x,y){
    tile(x,y);
    push()
    translate(20,20);
    rotate(radians(180));
    //translate(x+40,y);
    tile(-x-60,-y-20);
    pop();
}
//second row type
function tilebigger2(x,y){
    push()
    translate(20,20);
    rotate(radians(180));
    //translate(x+40,y);
    tile(-x-20,-y-20);
    pop();
    tile(x+40,y);
}
    


function tile(x,y){
    noStroke();
    push();
    translate(x,y);
    //background 
    fill(146, 195, 234);
    square(0,0,40);
    //midground
    fill(88, 96, 105);
    rect(0,0,40,15);
    //women/bull/violin
    strokeWeight(1);
    stroke(0);
    fill(253, 223, 186);
    beginShape();
    curveVertex(40,0);
    curveVertex(40,0);
    curveVertex(23.9,4.56);
    curveVertex(21.62,10.8);
    curveVertex(24.7,16.55);
    curveVertex(32.69,16.29);
    curveVertex(35.72,23.64);
    curveVertex(31.37,27.76);
    curveVertex(23.89,29.92);
    curveVertex(22.41,36.07);
    curveVertex(29.58,39.75);
    curveVertex(40,40);
    curveVertex(40,40);
    endShape();
    //eyes
    noFill();
    strokeWeight(1);
    stroke(0);
    rectMode(CENTER);
    rect(26.18,9.83,3,5,2);
    rect(26.64,33.83,3,5,2);
    //nose bottle
    rectMode(CORNER);
    noStroke();
    fill(86, 122, 183);
    rect(3.5,18.5,15,22);
    fill(255);
    rectMode(CENTER);
    strokeWeight(1);
    stroke(0);
    rect(11,20,15,8,4);
    fill(183, 52, 9);
    noStroke();
    circle(8.5,20,3);
    circle(13.5,20,3);
    //guitar middle 
    noFill();
    strokeWeight(1);
    stroke(0);
    arc(40,20,15,15,HALF_PI,PI+HALF_PI,OPEN);
    pop();
}

Looking outwards 05: 3D graphcis

Industrial light and Magic is a seminal american visual effects company that pioneered many computer graphic techiniques used in major movies, games and 3d graphics. The 1 project that they completed recently that will have a lasting effect on TV production is the Star Wars show, The Mandalorian. Having it’s founding roots in the original star wars movies, Industrial Light and Magic yet again pioneered another visual effects technique for the the new show. The filming of The Mandalorian was one of the first times real time rendering was used in filming. The desolate alien planets on the Mandalorian, where not real earthly locations but instead, real time, computer generated terrain designed by the 3D artists at ILM. These virtual sets were then cast onto “the Volume” a large circular stage with its floors ceilings and walls covered in high def LED screens for camera capture with the actors acting on them. What’s interesting about this is that the real time rendering engine ILM used was the Unreal engine, a 3d graphics software developed by the company Epic games with a focus on 3D video games. This feat, breaks several boundaries in that, not only does it prove that video game engines now have the capacity to perform at a level of photorealism but it also breaks the boundary of a simulated reality, in that in order for this technique to work, there needs to be real time 3D location and space tracking for the camera work to actually make sense in capturing the footage. Although 3D motion capturing was already a thing, it always required more post processing from the artists but in this case, it was good enough to be captured directly on camera.

Looking Outwards-05: 3D Computer Graphics

The 3D Computer Graphics project I chose to focus on was Generation Gap by Mike Campau. This project captured my attention because of how realistic the renderings were–I had to get a really good look to believe it was all computer graphics. The images were also colored in a way to invoke nostalgia, as he was depicting objects from his childhood. I admire it because of Campau’s ability to use CG to substitute photography. Like his other works, I believe Campau used photography as a baseline and used CGI programs to mimic the effects of a real photo. With rendering, he was able to emphasize the highlights, shadows, and small details to make the images come to life. Mike Campau’s artistic sensibilities are manifested in this project since, like in his other works, he captures the realness of the objects he produces through CG, to make the final outcome like a real photo.

Looking Outwards 5

After further researching Andy Lomas to get a better picture of 3d computer graphics, I came across his project “Cellular Forms”, created around 6 years ago. This project aims to mimic and simulate the visuals of cellular growth through algorithms which act as a rule set for the cell production. For example, one of the parameters that Lomas sets on his simulation is the nutrient level, which triggers production of splitting cells. 

While this could be taken very literally as the visuality of how cells are produced, what interested me about this project was the capacity it had to be further applied onto other projects. Since the project leaves the production of cells up to the simulation and parameter set, there is hypothetically an extremely large number of different outputs that can be produced: each in which can be related to other organic forms, such as coral, algae, or organs.

Project 05: Wallpaper

This wallpaper was inspired by a phone case I recently purchased online. Watermelons are one of my favorite fruits and green is my favorite color so I thought it’d be fun to code this design. To make it more dynamic, I decided to make the positions of the watermelons somewhat random and the placement of the seeds random inside so that each slice is unique.

sketch
function setup() {
    createCanvas(600, 400);
    background(101, 173, 119); // green background
    for(var x = 0; x <= width; x += 20){ // vertical stripes
    	stroke(136, 213, 156);
    	strokeWeight(5);
    	line(x, 0, x, height);
    }
    for(var y = 0; y <= height; y += 20){ // horizontal stripes
    	stroke(136, 213, 156);
    	strokeWeight(5);
    	line(0, y, width, y);
    }

}

function watermelonHalf() { // draw watermelon halves
	//semicircle
	rotate(radians(random(-30, 30))); // random position
	noStroke();
	fill(38, 144, 65);
	arc(0, 0, 60, 60, 0, PI); // green part
	fill(255);
	arc(0, 0, 55, 55, 0, PI); // white part
	fill(236, 80, 102);
	arc(0, 0, 50, 50, 0, PI); // red part
	for(var seeds = 0; seeds <= 5; seeds += 1){ // random seed positions
		fill(0);
		ellipse(random(-20, 20), random(5, 15), 2, 3);
	}
	noLoop();
}

function watermelonSlice() { // draw watermelon slices
	//triangular slice
	rotate(radians(random(60, 90))); // random position
	noStroke();
	fill(38, 144, 65);
	arc(0, 0, 70, 70, 0, PI/3); // green
	fill(255);
	arc(0, 0, 65, 65, 0, PI/3); // white
	fill(236, 80, 102);
	arc(0, 0, 60, 60, 0, PI/3); // red 
	for(var seeds = 0; seeds <= 2; seeds += 1){ // seeds
		fill(0);
		ellipse(random(15, 20), random(5, 20), 2, 3);
	}
	noLoop();
}

var column = 0; // column counter to alternate 
function draw() {
	for(var x = 30; x <= width; x += 80){
		if(column%2 == 0){ // if odd number columns
			for(var y = 0; y <= height; y += 120){ // first slice
				push();
				translate(x, y);
				watermelonSlice();
				pop();
			}
			for(var y = 60; y <= height; y += 120){ // second half
				push();
				translate(x, y);
				watermelonHalf();
				pop();
			}
			column += 1; // add to column counter
		}
		else{ // if even number columns
			for(var y = 0; y <= height; y += 120){ // first half
				push();
				translate(x, y);
				watermelonHalf();
				pop();
			}
			for(var y = 60; y <= height; y += 120){ // second slice
				push();
				translate(x, y);
				watermelonSlice();
				pop();
			}
			column += 1; // add to counter
		}
	}
}



LO – 05

    The 2004 film, The Polar Express, is a film I am very fond of. It is a film I have watched every year over the holidays since it was released. It brings back memories of when I was younger, the biggest being how I thought it was so cool that they animated the characters after actors, like Tom Hanks as the Conductor (among other characters) and Josh Hutcherson as the Hero Boy (although he didn’t voice him). I didn’t know what it was called at the time, I just remember my older siblings telling me they made the characters look like the voice actors. I know the term now to be called motion-capture (mo-cap), which digitally captures actors movements, features, emotions, etc., with a computerized camera to help develop virtual characters . Director Robert Zemeckis brought on the Sony ImageWorks team to insert actors like Tom Hanks into a CGI environment, called Performance Capture. Performance Capture is an improvement of mo-cap that uses digital cameras with a 360-range to help simultaneously record multiple actors’ facial expressions and body movement. Jerome Chen’s was the visual effects supervisor of ImageWorks who initially worked on the advancement of mo-cap, that was later called Performance Capture (as mentioned above). Along with the mo-cap aspect, there was a lot of time put into the rest of the animations (like the train, etc.). However, the biggest thing that stood out to me when I was younger were the characters. Zemeckis really wanted to articulate the emotion of each character, and with too small a budget to do live action, he turned to mo-cap and created a world that is hard not to love as it gets played every holiday season. To check out more information about the production of this film check out the link below:

And check out the trailer if you’ve never seen The Polar Express: