Project 09 – Portrait

With this project, I mainly wanted to create different color modes from the pixels. The background is black and white, the 1st set of selected pixels are the original colors, and when clicked the pixels become inverted.

sketch
// Emily Franco
// Section C
// efranco@andrew.cmu.edu
// Assignment-09

var sqr = [];
var sqrArrayLen = 150;

//true = original colors false = inverted
var colorStyle = true;

var count = 0; 
function preload(){
    face = loadImage("https://i.imgur.com/bu90lcN.jpg");
}

//constructor for square objects
function makeSquare(cx, cy, wdth){
    var c = {x:cx, y:cy, w:wdth}
    return c;
}

function setup(){
    createCanvas(480,480); 
    background("white");
    
    face.loadPixels(); 
    face.resize(480,600);
    greyscale(); 

    //define objects in sqr array 
	for(var i=0;i<=sqrArrayLen-1;i++){
	    var side1 = random(10,100);
	    var x = random(width);
	    var y = random(height);

	    var square = makeSquare(x,y,side1);
        sqr.push(square);
     }    
}

function draw() {   
    noFill();
    stroke("white");

    //draw 1st image only once
    if(count<=0){
    	drawAlterations()
    }
	
    count++;
	noLoop();
}

//draw changed made to image
function drawAlterations(){
	var opacity;
	var shift; 
	var c; 
	for(var i=0; i<=sqr.length-1;i++){
		noStroke();
		if(colorStyle){
			showColor(i);
		}else{
			invertColors(i);
		}
		print(colorStyle);
		
	}
}
//make image greyscale
function greyscale(){ 
	for (var i=0;i<=face.width;i++){
		for(var j=0;j<=face.height;j++){
			c = face.get(i,j);
			var grey = c[0]; 
			push();
			noStroke();
			fill(grey,150);
			square(i,j,1);
			pop();
		}
	} 
}

//change pixel color back to original only in boxed area
function showColor(index){
	var maxX = sqr[index].x + sqr[index].w;
	var maxY = sqr[index].y + sqr[index].w;

	for (var i=sqr[index].x;i<=maxX;i++){
		for(var j=sqr[index].y;j<=maxY;j++){
			c = face.get(i,j);
			opacity = random(50,150); 
			shift = random(-10,10);

			fill(c[0],c[1],c[2],opacity);
			square(i+shift,j+shift,1); 
		}
	} 
}

function invertColors(index){
	var maxX = sqr[index].x + sqr[index].w;
	var maxY = sqr[index].y + sqr[index].w;

	for (var i=sqr[index].x;i<=maxX;i++){
		for(var j=sqr[index].y;j<=maxY;j++){
			c = face.get(i,j);
			
			var r = 255-c[0];
			var g = 255-c[1];
			var b = 255-c[2];

			opacity = random(50,150);
			shift = random(-10,10);

			fill(r,g,b,opacity);
			square(i+shift,j+shift,1); 
		}
	} 
}
function mousePressed(){
	colorStyle = !colorStyle;
	drawAlterations();
}

Project 9

This project is fun to create. I decided to use little hearts to paint a portrait. To paint: press the mouse and drag. You can change to a smaller brush size by holding any key.

sketch
it will take you a few minutes to paint. This is a combination of smaller hearts and bigger hearts.
//Jenny Wang
//Section B
//jiayiw3@andrew.cmu.edu
//Project 09

var img;

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

function setup() {
    createCanvas(480, 480);
    imageMode(CENTER);
    noStroke();
    background("orange");
    frameRate(50);
}

function heart(x, y, size) {
  beginShape();
  vertex(x, y);
  bezierVertex(x - size / 2, y - size / 2, x - size, y + size / 3, x, y + size);
  bezierVertex(x + size, y + size / 3, x + size / 2, y - size / 2, x, y);
  endShape(CLOSE);
}

function draw() {
    
    //area radius for random pixels
    var xPosition = random(-5,5);
    var yPosition = random(-5,5);

    //set area for mouse
    var x = map(mouseX,0,width,0,1200); 
    var y = map(mouseY,0,height,0,1500); 

    //get the size of the pixel
    var pixelSize;

    //get the color of the pixel
    var pixC = img.get(x,y);
    

    //set to paint with mouse
    if(mouseIsPressed){
        push();
        translate(mouseX,mouseY);
        fill(pixC);

        //set heart shaped brush with different sizes
        if(keyIsPressed){
            pixelSize = random(4,8);
        }
        else{
            pixelSize = random(10,22);
        }
        heart(xPosition,yPosition,pixelSize);
        pop();
    }
}
    

Project 9 – Computational Portrait

This portrait is based on the idea of the probabilistic road map as described in ‘Probabilistic Roadmap Path Planning’ by H. Choset et al. where the figure in the portrait is graph G and the red background are obstacles/collisions.

Controls

  • RIGHT ARROW = advance drawing one step
  • ENTER = start & stop drawing
  • ‘r’ = refresh
sketch
//Name: Tsz Wing Clover Chau
//andrewid: ctchau
//Section E
//Project 9


var chosenPixels;
var step;

var bgPx = [];
var rStep;

var range = 30;
var baseImage;


function preload(){
    baseImage = loadImage("https://i.imgur.com/PaF0PFq.png");
}

function setup(){
    createCanvas(480, 480);
    background(255);
    frameRate(30);
    baseImage.loadPixels();

    //init array
    chosenPixels = [];
    bgPx = [];
    step = false;
    rStep =  random(0, 30);

    for (var i = 0; i < rStep; i++){
        pt = makePoint(int(random(0, 480)), int(random(0, 480)));
        if (isRed(pt)) {
            bgPx.push(pt);
        } else {
            chosenPixels.push(pt);
        }
    }
}


function draw() {
    drawBg();
    if (keyIsDown(RIGHT_ARROW) || step){   // press right arrow to invidually step
        addPx();
    }
    drawFace();
}


//HELPER FUNCTIONS
function makePoint(px, py){
    var pt = {x: px, y: py};
    pt.c = baseImage.get(px, py);
    pt.neighbors;
    return pt;
}

function addPx(){
    rStep =  random(0, 100);
    var newPx = 0;
    while (newPx < rStep){
        pt = makePoint(int(random(0, 480)), int(random(0, 480)));

        //add to bg array + pick new if red
        while (isRed(pt)){
            if (int(random(0, 8)) == 1){
                bgPx.push(pt);
            }
            pt = makePoint(int(random(0, 480)), int(random(0, 480)));
        }

        var min_dist = range;
        for (var j = 0; j < chosenPixels.length; j++){
            var checkPx = chosenPixels[j];
            var d = dist(checkPx.x, checkPx.y, pt.x, pt.y);
            
            if ((dist(checkPx.x, checkPx.y, pt.x, pt.y) < range) & (d < min_dist)){
                min_dist = d;
                stroke(pt.c);
                strokeWeight(0.5);
                line(checkPx.x, checkPx.y, pt.x, pt.y);
                chosenPixels.push(pt);
                newPx ++;
                break;
            }
        }
    }
}


function isRed(pt){
    if (pt.c[0] > 50 & pt.c[1] < 30){
        return true;
    }
    return false;
}

function keyPressed(){
    if (keyCode == ENTER){  //ENTER to autocomplete
        step = !step;
    } else if (key == 'r'){  //press 'r' to reset!
        setup();
    }
}



function drawBg(){
    for (var i = 0; i < bgPx.length; i++){
        px = bgPx[i];
        px.c[3]= 80;
        stroke(px.c);
        strokeWeight(0.3);
        if (int(random(0,2)) == 1){
            line(px.x, 0, px.x, height);
        } else {
            line(0, px.y, width, px.y);
        }
    }
}

function drawFace(){
    for (var i = 0; i < chosenPixels.length; i++){
        var curPx = chosenPixels[i];
        stroke(curPx.c);
        strokeWeight(5);
        point(curPx.x, curPx.y);
    }
}

Logic/Pseudocode:

  • Configuration q = series of randomly generated non-background pixels (ie. not red).
  • Q = new randomly generated non-background pixels
    • if distance from q -> Q < acceptable range, append to q
  • N = rStep (ie. no. of new non-background pixels added to q)
Probabilistic Roadmap Path Planning by H. Choset et Al
Probabilistic Roadmap Path Planning by H. Choset et Al

References:
http://www.cs.columbia.edu/~allen/F15/NOTES/Probabilisticpath.pdf

Looking Outwards 09

Caroline is a UI/UX designer, machine learning design researcher and artist concerned about consent in technology. She is the founder of convocation design and research agency which focuses on machine learning and ux design that is for public good. As a ux designer and ux researcher she worked with Intel, IBM Watson, Wikimedia Foundation, Amnesty Foundation, and more. She additionally has partnered with Harvard Kennedy School and the Mozilla Foundation.

What I admire about Caroline is that she is a UX/UI designer which is the job I aspire to have. Her work focusing on public good also inspires me to learn more about social issues related to technology rather than just aesthetics. In her project, “How to Explain a Hurricane to an Algorithm,” Caroline explains that when her grandmother’s home was destroyed in Hurricane Katrina, she found a bunch of personal and private objects that belong to the family. She spent her last 12 years photographing and looking at archives. Using an algorithm Caroline was able to represent a documentation of loss, anxiety, grief, and post trauma culture at home.

Website: https://carolinesinders.com/how-to-explain-a-hurricane-to-an-algorithm/

Archives and images of destructed items Hurricane Katrina

Looking Outwards 09: A Focus on Women and Non-binary Practitioners in Computational Art 

Title: REAL/RAW/FAST Identity System
Artist: adidas x FIELD.IO
(Commissioned by: adidas Global Brand Design, Generative System Design: FIELD.IO, Motion & Identity Design: DIA, Media Asset Production: Stink, Creative Lead: Fleur Isbell, Xander Marritt, Lead Developer: Bruno Imbrizi Developer: Seph Li, Riccardo Cambiassi, Samuel Honigstein, Documentation: Kosuke, Chris Dumon, Executive Creative Direction: Marcus Wendt, Creative Director: Mile Hughes, Motion Design: Julien Bauzin, Producer: Alice Shaughnessy, Motion Design: Xavier Boivin, Strategy + Consulting: Vera-Maria Glahn)

The project I’ve chosen to discuss is the REAL/RAW/FAST Identity System designed by FIELD.IO (in collaboration with DIA) for sportwear brand adidas. According to the project description, the REAL/RAW/FAST Identity System is the “new face of adidas flagship stores: A Generative Identity System for Retail Screens – bespoke, dynamic, scalable.” Essentially, the system pulls from a pool of kinetic typefaces, procedural animations and local elements that move and change compositions on a series of screens in real time, to create a visual storefront with a bold and unique brand identity. One thing I admire is how it can be adapted from “a plug-and-play rollout to a bespoke flagship version, the Generative System provides solutions for any scale and use case”. The encoded flexibility of the system allows it to be adapted to different campaigns, regardless of content, and to different storefronts, regardless of scale/ screen arrangement. By designing a system, the same elements within a single campaign can be reconfigured and remixed to remain fresh and engaging to the consumer’s eyes. Not only is this project aesthetically simple and clean, the compositions generated and the transitions between such compositions feel seamless, effortless and very satisfying. For me, it is the perfect example of how systems design can integrate digital art into marketing without feeling awkward or clumsy like most digital art campaigns tend to, but also how basic coding and illustration skills can be leveraged to serve a large scale, lucrative project.

Of the members of the team that worked on the REAL/RAW/FAST Identity System, the creator I’ve decided to focus on is Vera-Maria Glahn. She is the managing director for FIELD.io, a digital art studio based in London, UK.
She completed her undergraduate education in Arbitur, Arts, German, English and Philosophy at the Gymnasium Theodorianum in 2003, going on to receive a Masters in Art in Visual Communication with Distinction from the Kinsthochschule Kassel (School of Arts & Design in Kassel) in 2009. She started her career in the media arts industry in 2003 as a producer and curator, notably for the Kassel Documentary Film & Video Festival in Germany and the V2_Institute for the Unstable Media in Rotterdam, Netherlands. She co-founded FIELD.io with Creative Director Marcus Wendt in 2009 following her postgraduate studies and currently manages and produces independent and commissioned digital art for various brand and cultural institutions around the world. I’ve chosen to focus on Vera-Maria because as a co-founder of FIELD.io, her ethics and approach to computational art is reflected in the brand’s direction, allowing me to discuss the brand’s values as a whole. Some of the brand’s core tenants include:

  • Imagination (new forms of brand experience, storytelling, creative expression)
  • Innovation (developing new forms of interaction, products and services)
  • Technology (deep engagement + understanding for technically rich content)
  • Relationships (establishing deep + long term connections with brands + people)
    In particular, I really like how the brand (and likely due to Vera-Maria’s founding vision) have positioned themselves as pioneers of digital art and design strategies for major brands, and how everything – from their website UI to their projects to their team portraits on the website – serve to reinforce this vision.

Links:
https://field.systems/work/real-raw-fast-identity-system
https://2016.motionawards.com/judge/vera-maria-glahn/
https://www.linkedin.com/in/veraglahn/?originalSubdomain=de
https://expandedanimation.com/speaker/vera-maria-glahn/

Looking Outwards 09: Amanda Ghassei

Amanda Ghassei https://amandaghassaei.com/ 

This week, I looked at the work of Amanda Ghassei, an engineer and computational artist. Initially, I was drawn to her work due to the way she took real, tangible, and usually historical art forms and found ways to work with those concepts computationally. Her work includes algorithms about folding origami, explorations of the historical process of locked letters, and creating a simulation based off of the process of water-marbling. The project that I chose to examine more closely was her water-marbling work, mostly because of my aesthetic attraction to the vibrant palette she uses. This work connects to other work of hers which simulates fluids, which is impressive, but I find the conceptual act of digitally recreating a historical process to be more interesting. The past is so intangible and hard to access, so the act of computationally recreating the past, in a sense, is pretty intriguing.

Water Marbling Simulation, 2022

Lvanveen Project 9: Portrait

My project 9! I decided to reuse and modify some code from our wallpaper project to make the design more fun, and overall, I’m pretty pleased!

sketch
var img; //the code takes a sec to load, but it does load don't worry!

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

function setup() {
    createCanvas(480, 400);
    background(200);
    strokeWeight(0)
}

function draw() {
	fill(255);
	background(200)
	image(img, 0, 0, width, height);
	fill(255, 35, 10); //red
	rect(0, 0, width, height);

	for(var y = 0; y < 500; y += 100){ //initally the background was just bright red, but I wanted more of a pattern...
		for(var x = 0; x < 600; x += 200){ //... so I decided to reuse some code that made flowers that I used in week 5 w/ a change in color etc
            
			drawFlower(x, y);
		}
	}

	for(var y = -50; y < 500; y += 100){
		for(var x = 100; x < 600; x += 200){
			drawFlower(x, y);
		}
	}

    for(var col = 500; col < 600; col += 40){
        strokeWeight(2)
        stroke(110, 94, 66);
        fill(186, 156, 95);
        rect(col, 350, 40, 50);
    }
	for(var i = 0; i <= width/5; i++){ //use of 5 basically made the scale of the pixels 5x bigger
		for(var j = 0; j <= height/5; j++){
			c = img.get(i*5, j*5);
			if(c[0] > 110 & c[1] > 110 && c[2] > 110){
				strokeWeight(0);
				fill(140, 255, 251); //cyan blue of face
				rect(i*5, j*5, 5, 5);
			}
		}
	}
}

function drawFlower(x, y) { //code to make flowers
	push();
	translate(x, y); 
	strokeWeight(8);
	stroke(184, 176, 79); //green stem color
	line(-25, 35, -40, 50);
	line(-40, 50, -45, 60);
	line(-45, 60, -55, 20);
	line(-55, 20, -55, 0);
	line(-45, 60, -55, 90);

	strokeWeight(0);
	fill(184, 176, 79); //same green
	ellipse(-55, 0, 20, 30);

	push();
	rotate(radians(30));
	fill(209, 187, 96); //underside of stem color
    rect(-10, 0, 15, 45);
    pop();

    fill(255, 209, 25); //main flower yellow color
    rect(-15, -35, 30, 50); //base of the flowers
    rect(-35, -5, 40, 20);
    rect(5, -5, 30, 30); 
    rect(-15, 15, 20, 20);

    push();
    rotate(radians(45));
    rect(-14, 6, 15, 30);
    rect(-32, -4, 30, 15);
    rect(-5, -35, 15, 30);
    pop();

    strokeWeight(1);
    stroke(245, 183, 15); //darker yellow thin line flower color
    line(0, 0, -3, -25);
    line(0, 0, 7, -25);
    line(0, 0, -8, -25);
    line(0, 0, 12, -25);
    line(0, 0, -30, 1);
    line(0, 0, -30, -2);
    line(0, 0, -25, 15);
    line(0, 0, -20, 20);
    line(0, 0, 27, 15);
    line(0, 0, 25, 20);
    line(0, 0, 30, 5);
    line(0, 0, 30, 0);

    stroke(250, 231, 180); //flower light cream color
    strokeWeight(2);
    line(0, 0, 3, -25);
    line(0, 0, -30, 5);
    line(0, 0, 30, 10);

    strokeWeight(1);
    stroke(242, 223, 145); //lines connecting seeds color
    line(0, 0, 10, -10);
    line(0, 0, 9, -5);
    line(0, 0, 13, -13);
    line(0, 0, 15, -18);
    line(0, 0, 10, -15);

    strokeWeight(0);
    fill(69, 43, 31); //seed color
    ellipse(10, -10, 3, 3);
    ellipse(9, -5, 3, 3);
    ellipse(13, -13, 3, 3);
    ellipse(15, -18, 3, 3);
    ellipse(10, -15, 3, 3);
    pop();
}

Looking Outwards-09

The piece if work I selected is “Body Sketches” by Molmol Kuo. Molmol Kuo is a Taiwanese artist and educator. Kuo works closely with NYU’s Tisch school of the Arts’ graduate student program consulting students on projects which combines the arts, augmented reality and technology. Kuo is also a partner at YesYesNo Studio, a multimedia design and arts studio. The work was at the Brooklyn Academy of Museum and uses computation and a screen to extend the user/observer’s body into a variety of dynamic costumes. The base of the project is three individuals projections, each of which then use the human form as a starting point and transform it through different geometric and physical changes.

looking outwards 9

Text Rain

I chose Camille Utterback for this weeks looking outwards. She’s an american artist and mostly works in instilation and interactive art using computational and generative methods. She’s very interested in how the human body moves and gestures and how that motion can be translated into digital images. The work I looked at specifically was called text rain, which was an interactive projection of people in the exibit with text falling down onto their body like rain and resting. You can push them around and play with them, and it looked quite fun actually. I thought it was a great exploration of the human aspect of typography and text and how we can connect to something as lifeless as letters.

Project-09: ASCii Portrait

had a lot of fun w dis one

sketch
// Zoe Lin (ID: youlin)
// Section B

//please give it a couple seconds to load!
//press the mouse to invert the colors!
var density = '@Ñ#W$0985321!?=+-;:,._ ';
var r, g, b;
var img;

function preload() {
  img = loadImage("https://i.imgur.com/GBXXDnf.png"); //load image
}

function setup() {
  createCanvas(350, 450);
  //frameRate(10);
  textAlign(CENTER, CENTER); //ensures ascii text aligns with pixels
  noStroke();
}

function draw() {
  img.loadPixels(); //loads each individual pixel of img
  background(0);

  //var denShuffle = shuffle(density);
  var newWidth = width/img.width;
  var newHeight = height/img.height;
  for (var i = 0; i < img.width; i++) {
    for (var j = 0; j < img.height; j++) {
      var index = (i+j*img.width) * 4; //sets index to match image pixel
      r = img.pixels[index]; g = img.pixels[index+1]; b = img.pixels[index+2];
      var average = (r+g+b) / 3; //finds average rgb index
      textSize(newWidth);
      fill(255);

      //maps index of letter to image pixels
      var letterdex = floor(map(average,0,255,density.length,0));
      //draws ascii letters
      text(density.charAt(letterdex), i*newWidth, j*newHeight);
      
    }
  }  
}

//note: mousePressed also takes a few seconds to load!
function mousePressed() { //inverts colors when mouse is pressed
  density = density.split('').reverse().join(''); //reverses density string
}