• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • about this course
  • syllabus
  • rubric
  • labs
  • blog

HCI | TechX

August 14, 2020

Harry Hao HW DAY8

PImage img; 

int cellsize = 5; 

void setup() {

  size(600, 404, P3D);

  img = loadImage(“w.jpg”); 

}

void draw() {

  background(255);

  for (int x = 0; x < width; x=x+cellsize) {

    for (int y = 0; y < height; y=y+cellsize) {

      int index = x + y * width; 

      color c = img.pixels[index]; 

      float z = map(brightness(img.pixels[index]), 0, 255, 0, mouseX);

      pushMatrix();

      translate(x, y, z);

      fill(c);

      noStroke();

      rectMode(CENTER);

      rect(0, 0, cellsize, cellsize);

      popMatrix();

    }

  }

}

void setup() {

  // put your setup code here, to run once:

  Serial.begin(9600);

}

void loop() {

  // put your main code here, to run repeatedly:

  int sensorValue = analogRead(A0)/4;

  Serial.write(sensorValue);

  delay(1);

}

In my lab, I used the rheostat to change the distance between each block in that pixel image. I, as a human, interact with that the computers to eventually display and process the product. Basically, my product is interactive in a small scale, but if designers use this in some larger products, the interaction between people and computers will become obvious. 

Absolutely, this is an engaging interaction. Human is involved to change the initial form of the image.

If I got more time to work on this lab, I might change the image which only displays in the computers to the larger outdoors project. Also, by adding more sensors to make it become changeable.

Filed Under: blog

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Recent Posts

  • Homework Day 8 – Simon Hsieh
  • homework day 8 – Michael
  • Homework-day8-Sophie
  • Harry Hao HW DAY8
  • homework day 8 – dora

Copyright © 2025 HCI | TechX on the Brunch Pro Theme