Source Code. Projects. Nerd Stuff. Art Stuff.

Building the Machine

Posted on October 29th, by amoeboar in classes, pcomp. No Comments

After last week’s play tests, we realized that the users needed more response from our device so that they could know how they were controlling the machine’s output. Read more


Drawing Machine Playtests

Posted on October 20th, by amoeboar in classes, pcomp. No Comments

I started playing around with the Minim library for Processing to see how we might be able to read sound data as input for our Drawing Machine. Read more


Underwater

Posted on October 16th, by amoeboar in classes, icm. No Comments

A sketch that puts you underwater!
 

[gn_spoiler title="underwater source code:" open="0" style="1"]

[gn_tabs style="3"]

[gn_tab title="underwater"]

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172/********************************
 / John Capogna
 / underwater.pde
 / ITP, 2012
 ********************************/

import processing.video.*;

Capture cam;
PImage displayImg;
//int greenX = 0;
//int greenY = 0;
//float mostGreenPixel = 10000;  // start green value very high

ArrayList images;

void setup() {
  size(640, 480);

  cam = new Capture(this, 640, 480);
  cam.start();

  displayImg = new PImage(640, 480);

  // Initialize the ArrayList
  images = new ArrayList();

  // Make bubbles and fishes
  for (int i = 0; i < 25; i++) {
    if (i < 20) {
      Bubble tempBubble = new Bubble(random(width), random(height), random(-1, 1), random(-1, 1));
      images.add(tempBubble);
    }
    else {
      Fish tempFish = new Fish(random(width), random(height), random(-1, 1), random(-1, 1));
      images.add(tempFish);
    }
  }
}  

void draw() {
  if (cam.available()) {
    cam.read();

    for (int x = 0; x < cam.width; x++) {
      for (int y = 0; y < cam.height; y++) {
        // (width – x – 1) refers to a reversed image
        int dIndex = x + y * cam.width;  // display index
        int cIndex = (width – x – 1) + y * cam.width;  // camera index

        color currentPixel = cam.pixels[cIndex];

        displayImg.pixels[dIndex] = cam.pixels[cIndex];
      }
    }

    displayImg.updatePixels();

    image(displayImg, 0, 0);
  }

  // We go through the images ArrayLIst
  for (int i = 0; i < images.size(); i++) {
    // We cast every object we pull out as a Bubble. Read more


Drawing Machine Research

Posted on October 10th, by amoeboar in classes, pcomp. No Comments

My group is making a drawing machine. We will need to take extra care to ensure an element of interactivity for this project. Read more


Accelerometer + LED Matrix

Posted on October 9th, by amoeboar in classes, pcomp. No Comments

Following the lab tutorial, I used Processing to draw a circle based on an accelerometer’s x- and y-axis data. Read more


Cymatics

Posted on October 9th, by amoeboar in classes, cookingwithsound. No Comments

A study of cymatics, observable and visible sound and vibration in fluid mediums. Read more


Many Objects

Posted on October 9th, by amoeboar in classes, icm. No Comments

Making use of objects and ArrayLists.
Class BaseShape sets the parameters for all shapes, which contains movement properties and contains a “Bouncing Shape” check for walls. Read more


Moving Storybook

Posted on October 2nd, by amoeboar in classes, icm. No Comments

I created an animated storybook. A collection of nouns, adjectives, and verbs is stored in a word array, and each time the user clicks the mouse, a random word is chosen. Read more


Microphone

Posted on October 1st, by amoeboar in classes, cookingwithsound. No Comments

Wrap the magnets with tape.

Prepare the bolt and washers

Wrap the straw with 32-gauge magnetic copper wire. Read more