Fall 2004

  • Phys Comp

Fall 2005

  • Advanced Tech
  • The Creative Act
  • Video for New Media

Spring 2005

  • Conceptual Design
  • Networked Objects
  • Video Art

Spring 2006

  • User Centered Design

Post-ITP

Links

  • robseward.com
  • Generative Theory Of Tonal Music Software

Recent Entries

  • Slowly
  • More
  • Light studies continued
  • Continued
  • Library Light Study Continued
  • Library light study
  • Final Project
  • Kitchen Inventory System User Scenario
  • 10 (approx.) Ideas
  • Kitchen Observations 1-5

Archives

  • February 2007
  • May 2006
  • April 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • May 2005
  • March 2005
  • February 2005
  • January 2005
  • November 2004
  • October 2004
  • September 2004

« Beer Garden Sound Meter -- Project 1 | Main | Midi Lab »

October 20, 2004

Serial Communication Lab--Using Pots to change RGB

For my serial communication lab, I wrote a processing program that changes the RGB values of a JPG according to potentiometer input from my board.




----

For my serial communication lab, I wrote a Processing program that changes the RGB values of a JPG according to potentiometer input from my board.

My Board:


Mapping
My processing program multiplies the RGB values in a picture by variables that are connected to the potentiometers. The potentiometers have an output between 0 and 255. Some mapping was in order to make them have a desirable effect on the pictures. After some experimentation, I decided that 0-125 would make the multiplier go between 0 and 1. For pot values between 125 and 255, the multiplier goes between 1 and 15.

Random Numbers
To create interesting visual effects, I had the multiplier fluctuate randomly. The pot input set boundaries for the random number generator. If the mapped pot input is 0, the multiplier will fluctuate between 0 and 1, if it produces 15, it will fluctuate between 1 and 15. For aesthetic reasons, 1 is always one of the boundaries.


Here's the Processing code.


Movies
In this movie I have JPG of the visible spectrum. At the start, all pots are at their midpoint. Then I move them, starting with blue, towards 0. As a result the colors start to fluctuate between 0 and their original values. After I have done that to all colors, I move the pots, starting with the red one, to their maximum values. This causes the colors to fluctuate between their original value and the maximum value allowed by Processing.


Here's another movie where I do the same thing to a more interesting picture.



Here's the Processing code.




Posted by rus200 at October 20, 2004 06:12 PM