GMU:Urban Development Kit/Urban Space for Mind: Difference between revisions

From Medien Wiki
mNo edit summary
mNo edit summary
Line 63: Line 63:


Below is a Program I have written that takes some of sciences dogmas today and by clicking your mouse you can mix up the original sentences by changing at random the Subject, descriptor and object, creating new dogmas, some that don't make compete grammatical sense. Yet.  
Below is a Program I have written that takes some of sciences dogmas today and by clicking your mouse you can mix up the original sentences by changing at random the Subject, descriptor and object, creating new dogmas, some that don't make compete grammatical sense. Yet.  
import processing.core.*;
import processing.data.*;
import processing.event.*;
import processing.opengl.*;
import java.util.HashMap;
import java.util.ArrayList;
import java.io.File;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
public class Seb_Arrays extends PApplet {


//Declare
//Declare
Line 79: Line 95:
};
};


void setup() {
public void setup() {
   size(800, 250);
   size(800, 250);
   background(0, 15, 108);
   background(0, 15, 108);
Line 86: Line 102:
}
}


void draw() {
public void draw() {
   frameRate(10);
   frameRate(10);


Line 96: Line 112:


       int random[] = {
       int random[] = {
         int(random(subject.length)),  
         PApplet.parseInt(random(subject.length)),  
         int(random(descriptor.length)),  
         PApplet.parseInt(random(descriptor.length)),  
         int(random(oBject.length)),
         PApplet.parseInt(random(oBject.length)),
       };
       };
       fill(255);
       fill(255);
Line 112: Line 128:
   else {
   else {
     redraw();
     redraw();
  }
}
  static public void main(String[] passedArgs) {
    String[] appletArgs = new String[] { "Seb_Arrays" };
    if (passedArgs != null) {
      PApplet.main(concat(appletArgs, passedArgs));
    } else {
      PApplet.main(appletArgs);
    }
   }
   }
}
}


[[Category:Initial Beginnings]]
[[Category:Initial Beginnings]]