Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

merged

  • Loading branch information...
commit 0cd57072520db14a9e085ec1cbb12793bd057d82 2 parents b806a32 + 3acfdfe
@cibomahto cibomahto authored
View
29 CrawlTest.pde
@@ -0,0 +1,29 @@
+class CrawlTest extends Routine {
+ int y;
+ int x;
+
+ void setup() {
+ y=0;
+ x=0;
+ }
+
+ void draw() {
+ background(0);
+
+ if (frameCount % 4 == 0) {
+ x++;
+ }
+ if (x>width) {
+ x=0;
+ y++;
+
+ if (y>height) {
+ y=0;
+ }
+ }
+
+ stroke(255);
+ point(x,y);
+ }
+}
+
View
32 Dacwes.pde
@@ -81,10 +81,40 @@ public class Dacwes {
private int getAddress(int x, int y) {
if (addressingMode == ADDRESSING_VERTICAL_NORMAL) {
+ return (x * h + y);
+ }
+ else if (addressingMode == ADDRESSING_VERTICAL_HALF) {
+ return ((y % pixelsPerChannel) + floor(y / pixelsPerChannel)*pixelsPerChannel*w + x*pixelsPerChannel);
+ }
+ else if (addressingMode == ADDRESSING_VERTICAL_FLIPFLOP) {
+ if (y>=pixelsPerChannel) {
+ int endAddress = (x+1) * h - 1;
+ int address = endAddress - (y % pixelsPerChannel);
+ return address;
+ }
+ else {
+ return (x * h + y);
+ }
+ }
+ else if (addressingMode == ADDRESSING_HORIZONTAL_NORMAL) {
return (y * w + x);
}
+ else if (addressingMode == ADDRESSING_HORIZONTAL_HALF) {
+ return ((x % pixelsPerChannel) + floor(x / pixelsPerChannel)*pixelsPerChannel*h + y*pixelsPerChannel);
+ }
+ else if (addressingMode == ADDRESSING_HORIZONTAL_FLIPFLOP) {
+ if (x>=pixelsPerChannel) {
+ int endAddress = (y+1) * w - 1;
+ int address = endAddress - (x % pixelsPerChannel);
+ return address;
+ }
+ else {
+ return (y * h + x);
+ }
+ }
+
return 0;
- }
+ }
public void sendMode(String modeName) {
byte modeBuffer[] = new byte[modeName.length()+1];
View
24 Greetz.pde
@@ -1,13 +1,14 @@
class Greetz extends Routine {
int FONT_SIZE = 16;
PFont font;
+ PImage imgCopy;
String messages[] = new String[] {
- "DISORIENT"//,
+ "N Y C R"//,
// "KOSTUME KULT",
// "BLACK LIGHT BALL"
// "COUNTRY CLUB"
};
- String message = "DISORIENT";
+ String message = "N Y C R";
void setup(PApplet parent) {
super.setup(parent);
@@ -25,15 +26,18 @@ class Greetz extends Routine {
}
fill(255,128,64);
- pushMatrix();
- rotate(HALF_PI);
- text(message, x, 0);
- popMatrix();
-
- PImage i = get(0,40-FONT_SIZE,WIDTH,FONT_SIZE);
- i.resize(WIDTH,FONT_SIZE*6);
- image(i,0,40-FONT_SIZE);
+ text(message, x, FONT_SIZE);
+ if (height/2 > FONT_SIZE) {
+
+ image(get(0,0,width,FONT_SIZE),0,20,width,height/2);
+ fill(0);
+ rect(0,0,width,FONT_SIZE);
+ //copy(0,0,width,FONT_SIZE,0,FONT_SIZE,width,FONT_SIZE/2);
+ //imgCopy = copy(0,0,width,FONT_SIZE);
+ //image(imgCopy,0,0,width,height);
+ }
+
if (frameCount % 2 == 0) {
x = x - 1;
}
View
27 WarpSpeedMrSulu.pde
@@ -0,0 +1,27 @@
+class WarpSpeedMrSulu extends Routine {
+ int NUM_STARS = 500;
+ WarpStar[] warpstars;
+
+ void setup(PApplet parent) {
+ super.setup(parent);
+ warpstars = new WarpStar[NUM_STARS];
+ for (int i = 0; i<NUM_STARS; i++) {
+ warpstars[i] = new WarpStar();
+ }
+ }
+
+ void draw() {
+ background(0);
+ stroke(255);
+
+ for (int i=0; i<NUM_STARS; i++) {
+ warpstars[i].draw();
+ }
+
+ if (frameCount - modeFrameStart > FRAMERATE*TYPICAL_MODE_TIME) {
+ newMode();
+ }
+ }
+
+
+}
View
37 WarpStar.pde
@@ -0,0 +1,37 @@
+class WarpStar {
+ float x;
+ float y;
+ float len;
+ float v;
+
+ public WarpStar() {
+ this.reset();
+ }
+
+ public void reset() {
+ x = int(random(0, WIDTH));
+ y = int(random(0, -100));
+
+ v = random(0, 1);
+ len = v * 5;
+ }
+
+ public void draw() {
+ y = y + v;
+
+ int r = int(map(y, 0, HEIGHT, 0, 255));
+ int g = 0;
+ int b = 0;
+
+ stroke(r, g, b);
+ point(x, y);
+
+ for (int i=0; i<len; i++) {
+ stroke(255 >> i / 2);
+ point(x, y - i);
+ }
+
+ if (y > HEIGHT) this.reset();
+ }
+}
+
View
21 domeTransmitter.pde
@@ -1,10 +1,13 @@
+import ddf.minim.*;
+import ddf.minim.signals.*;
+import ddf.minim.analysis.*;
+import ddf.minim.effects.*;
+
import codeanticode.gsvideo.*;
import processing.opengl.*;
import java.lang.reflect.Method;
import hypermedia.net.*;
import java.io.*;
-import ddf.minim.*;
-import ddf.minim.analysis.*;
int WIDTH = 24;
int HEIGHT = 160;
@@ -53,13 +56,13 @@ WiiController controller;
void setup() {
// Had to enable OPENGL for some reason new fonts don't work in JAVA2D.
- size(WIDTH, HEIGHT);
+ size(WIDTH,HEIGHT);
frameRate(FRAMERATE);
-
+
dacwes = new Dacwes(this, WIDTH, HEIGHT);
dacwes.setAddress(hostname);
- dacwes.setAddressingMode(Dacwes.ADDRESSING_VERTICAL_NORMAL);
+ dacwes.setAddressingMode(Dacwes.ADDRESSING_HORIZONTAL_NORMAL);
setMode(0);
@@ -88,6 +91,7 @@ void setMode(int newMode) {
println("New mode " + currentRoutine.getClass().getName());
// currentRoutine.reset();
+
}
void newMode() {
@@ -103,7 +107,7 @@ void newMode() {
}
setMode(newMode);
- // dacwes.sendMode(enabledModes[newMode]);
+// dacwes.sendMode(enabledModes[newMode]);
}
void draw() {
@@ -133,7 +137,8 @@ void draw() {
currentRoutine.isDone = false;
newMode();
}
- // println(frameRate);
- dacwes.sendData();
+// println(frameRate);
+ dacwes.sendData();
}
+
Please sign in to comment.
Something went wrong with that request. Please try again.