Media Theory for the 21st Century

January 29, 2008

hello world

Filed under: Discussion — johnbcarpenter @ 7:20 am
Tags: , , ,

 
//code is written in processing, for more info see
//http://www.processing.org 
 
//set the initial variables for the program
//initial text location
int textX = 50;
int textY = 50;

//initial text speed (X and Y)
int textSpeedX = 1;
int textSpeedY = 2;
 
void setup(){ /*void is a keword indicating a function
  setup–Called once when the program is started. 
  Used to define initial enviroment properties 
  such as screen size, background color, loading images, etc. 
  before the draw() begins executing. */
  size(200, 200);

}

void draw() {
  //load/setup the font
  PFont font; //PFont is the font class for Processing 
  font = loadFont(“Courier-14.vlw”);   //loadFont loads a font 
  //into a variable of type PFont
  textFont(font, 14);   //textFont sets the current font

  //create the trailing effect
  //fill(128);
  fill(128, 10);
  rect(-1, -1, width+1, height+1);

  //choose text color + draw text to the screen
  fill(255);
  text(“hello world”, textX, textY);

  //reverse text direction when it reaches the edge of the window
  if((textX >= (width-90)) || (textX <= 0)){
    textSpeedX = textSpeedX*(-1);
  } 
  if((textY >= height) || (textY <= 8)){
    textSpeedY = textSpeedY*(-1);
  } 

  //update the text location in the window
  textX = textX+textSpeedX;
  textY = textY+textSpeedY;
}
 

processing applet image capture               

Advertisements

January 26, 2008

Lost but not for long: The Art of Me[ez]lang.elle.ing

Filed under: Admin,Readings — P.J. @ 10:50 pm
Tags: , , ,

The original link to the above listed in the syllabus directs to an expired site, but for reference I found what might be where the material has migrated.

The Art of Me[ez]lang.elle.ing

week 4: code websites

Filed under: Discussion — johnbcarpenter @ 9:27 pm
Tags: , , , ,


hi all,
i’ll be discussing processing (http://processing.org) in class on tuesday. i chose processing because it’s an incredibly fast and flexible software tool for visual designers + one of it’s creators (casey reas) is the head of the design | media arts program here at UCLA.

“processing relates software concepts to principles of visual form, motion, and interaction. it integrates a programming language, development environment, and teaching methodology into a unified system” (reas and fry, “processing”, 1). processing is an open source software / programming language that is based on java.

the websites i’ll be discussing on tuesday:

website 1
http://acg.media.mit.edu/people/fry/valence/

valence by ben fry

“the image on this page is taken from a visualization of the contents of the book “the innocents abroad” by mark twain. the program reads the book in a linear fashion, dynamically adding each word into three-dimensional space.”
more at… http://benfry.com/

website 2
http://reas.com/category.php?section=process

process 6 by reas, 2005

“text that defines a process”…
more at… http://reas.com/

Blog at WordPress.com.