removing applet folders from svn

This commit is contained in:
benfry
2011-04-17 17:50:52 +00:00
parent 433feb6247
commit eb8c319af5
626 changed files with 0 additions and 32342 deletions
@@ -1,137 +0,0 @@
import processing.core.*;
import java.applet.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.text.*;
import java.util.*;
import java.util.zip.*;
import java.util.regex.*;
public class KineticType extends PApplet {
/**
* Kinetic Type
* by Zach Lieberman.
*
* Using push() and pop() to define the curves of the lines of type.
*/
Line ln;
Line lns[];
String words[] = {
"sometimes it's like", "the lines of text", "are so happy", "that they want to dance",
"or leave the page or jump", "can you blame them?", "living on the page like that",
"waiting to be read..."
};
public void setup()
{
size(640, 360, P3D);
// Array of line objects
lns = new Line[8];
// Load the font from the sketch's data directory
textFont(loadFont("Univers66.vlw.gz"), 1.0f);
// White type
fill(255);
// Creating the line objects
for(int i = 0; i < 8; i++) {
// For every line in the array, create a Line object to animate
// i * 70 is the spacing
ln = new Line(words[i], 0, i * 70);
lns[i] = ln;
}
}
public void draw()
{
background(0);
translate(-200, -50, -450);
rotateY(0.3f);
// Now animate every line object & draw it...
for(int i = 0; i < 8; i++) {
float f1 = sin((i + 1.0f) * (millis() / 10000.0f) * TWO_PI);
float f2 = sin((8.0f - i) * (millis() / 10000.0f) * TWO_PI);
Line line = lns[i];
pushMatrix();
translate(0.0f, line.yPosition, 0.0f);
for(int j = 0; j < line.myLetters.length; j++) {
if(j != 0) {
translate(textWidth(line.myLetters[j - 1].myChar) * 75, 0.0f, 0.0f);
}
rotateY(f1 * 0.005f * f2);
pushMatrix();
scale(75.0f);
text(line.myLetters[j].myChar, 0.0f, 0.0f);
popMatrix();
}
popMatrix();
}
}
class Letter
{
char myChar;
float x;
float y;
Letter(char c, float f, float f1)
{
myChar = c;
x = f;
y = f1;
}
}
class Line
{
String myString;
int xPosition;
int yPosition;
int highlightNum;
float speed;
float curlInX;
Letter myLetters[];
Line(String s, int i, int j)
{
myString = s;
xPosition = i;
yPosition = j;
myLetters = new Letter[s.length()];
float f1 = 0.0f;
for(int k = 0; k < s.length(); k++)
{
char c = s.charAt(k);
f1 += textWidth(c);
Letter letter = new Letter(c, f1, 0.0f);
myLetters[k] = letter;
}
curlInX = 0.1f;
}
}
class Word
{
String myName;
int x;
Word(String s)
{
myName = s;
}
}
static public void main(String args[]) {
PApplet.main(new String[] { "KineticType" });
}
}
@@ -1,66 +0,0 @@
/**
* Kinetic Type
* by Zach Lieberman.
*
* Using push() and pop() to define the curves of the lines of type.
*/
Line ln;
Line lns[];
String words[] = {
"sometimes it's like", "the lines of text", "are so happy", "that they want to dance",
"or leave the page or jump", "can you blame them?", "living on the page like that",
"waiting to be read..."
};
void setup()
{
size(640, 360, P3D);
// Array of line objects
lns = new Line[8];
// Load the font from the sketch's data directory
textFont(loadFont("Univers66.vlw.gz"), 1.0);
// White type
fill(255);
// Creating the line objects
for(int i = 0; i < 8; i++) {
// For every line in the array, create a Line object to animate
// i * 70 is the spacing
ln = new Line(words[i], 0, i * 70);
lns[i] = ln;
}
}
void draw()
{
background(0);
translate(-200, -50, -450);
rotateY(0.3);
// Now animate every line object & draw it...
for(int i = 0; i < 8; i++) {
float f1 = sin((i + 1.0) * (millis() / 10000.0) * TWO_PI);
float f2 = sin((8.0 - i) * (millis() / 10000.0) * TWO_PI);
Line line = lns[i];
pushMatrix();
translate(0.0, line.yPosition, 0.0);
for(int j = 0; j < line.myLetters.length; j++) {
if(j != 0) {
translate(textWidth(line.myLetters[j - 1].myChar) * 75, 0.0, 0.0);
}
rotateY(f1 * 0.005 * f2);
pushMatrix();
scale(75.0);
text(line.myLetters[j].myChar, 0.0, 0.0);
popMatrix();
}
popMatrix();
}
}
@@ -1,13 +0,0 @@
class Letter
{
char myChar;
float x;
float y;
Letter(char c, float f, float f1)
{
myChar = c;
x = f;
y = f1;
}
}
@@ -1,28 +0,0 @@
class Line
{
String myString;
int xPosition;
int yPosition;
int highlightNum;
float speed;
float curlInX;
Letter myLetters[];
Line(String s, int i, int j)
{
myString = s;
xPosition = i;
yPosition = j;
myLetters = new Letter[s.length()];
float f1 = 0.0;
for(int k = 0; k < s.length(); k++)
{
char c = s.charAt(k);
f1 += textWidth(c);
Letter letter = new Letter(c, f1, 0.0);
myLetters[k] = letter;
}
curlInX = 0.1;
}
}
@@ -1,10 +0,0 @@
class Word
{
String myName;
int x;
Word(String s)
{
myName = s;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

@@ -1,145 +0,0 @@
import processing.core.*;
import java.applet.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.text.*;
import java.util.*;
import java.util.zip.*;
import java.util.regex.*;
public class LetterK extends PApplet {
/**
* Letter K
* by Peter Cho.
*
* Move the mouse across the screen to fold the "K".
*/
int backgroundColor;
int foregroundColor;
int foregroundColor2;
float px, py;
float pfx, pfy;
float pv2, pvx, pvy;
float pa2, pax, pay;
float pMass, pDrag;
public void setup() {
size(640, 360, P3D);
noStroke();
backgroundColor = color(134, 144, 154);
foregroundColor = color(235, 235, 30);
foregroundColor2 = color(240, 130, 20);
initParticle(0.6f, 0.9f, width/2, height/2);
}
public void draw() {
background(backgroundColor);
pushMatrix();
iterateParticle(0.15f*(-px+mouseX), 0.15f*(-py+(height-mouseY)));
translate(width/2, height/2, 0);
fill(foregroundColor);
drawK();
pushMatrix();
translate(0, 0, 1);
translate(0.75f * (px-width/2), -0.75f * (py-height/2), 0);
translate(0.75f * (px-width/2), -0.75f * (py-height/2), 0);
rotateZ(atan2(-(py-height/2), (px-width/2)) + PI/2);
rotateX(PI);
rotateZ(-(atan2(-(py-height/2), (px-width/2)) + PI/2));
fill(foregroundColor2);
drawK();
popMatrix();
translate(0.75f * (px-width/2), -0.75f * (py-height/2), 2);
rotateZ(atan2(-(py-height/2), (px-width/2)) + PI/2);
fill(backgroundColor);
beginShape(QUADS);
vertex(-640, 0);
vertex( 640, 0);
vertex( 640, -360);
vertex(-640, -360);
endShape();
popMatrix();
}
public void initParticle(float _mass, float _drag, float ox, float oy) {
px = ox;
py = oy;
pv2 = 0.0f;
pvx = 0.0f;
pvy = 0.0f;
pa2 = 0.0f;
pax = 0.0f;
pay = 0.0f;
pMass = _mass;
pDrag = _drag;
}
public void iterateParticle(float fkx, float fky) {
// iterate for a single force acting on the particle
pfx = fkx;
pfy = fky;
pa2 = pfx*pfx + pfy*pfy;
if (pa2 < 0.0000001f) {
return;
}
pax = pfx/pMass;
pay = pfy/pMass;
pvx += pax;
pvy += pay;
pv2 = pvx*pvx + pvy*pvy;
if (pv2 < 0.0000001f) {
return;
}
pvx *= (1.0f - pDrag);
pvy *= (1.0f - pDrag);
px += pvx;
py += pvy;
}
public void drawK() {
pushMatrix();
scale(1.5f);
translate(-63, 71);
beginShape(QUADS);
vertex(0, 0, 0);
vertex(0, -142.7979f, 0);
vertex(37.1992f, -142.7979f, 0);
vertex(37.1992f, 0, 0);
vertex(37.1992f, -87.9990f, 0);
vertex(84.1987f, -142.7979f, 0);
vertex(130.3979f, -142.7979f, 0);
vertex(37.1992f, -43.999f, 0);
vertex(77.5986f-.2f, -86.5986f-.3f, 0);
vertex(136.998f, 0, 0);
vertex(90.7988f, 0, 0);
vertex(52.3994f-.2f, -59.999f-.3f, 0);
endShape();
//translate(63, -71);
popMatrix();
}
static public void main(String args[]) {
PApplet.main(new String[] { "LetterK" });
}
}
@@ -1,125 +0,0 @@
/**
* Letter K
* by Peter Cho.
*
* Move the mouse across the screen to fold the "K".
*/
color backgroundColor;
color foregroundColor;
color foregroundColor2;
float px, py;
float pfx, pfy;
float pv2, pvx, pvy;
float pa2, pax, pay;
float pMass, pDrag;
void setup() {
size(640, 360, P3D);
noStroke();
backgroundColor = color(134, 144, 154);
foregroundColor = color(235, 235, 30);
foregroundColor2 = color(240, 130, 20);
initParticle(0.6, 0.9, width/2, height/2);
}
void draw() {
background(backgroundColor);
pushMatrix();
iterateParticle(0.15*(-px+mouseX), 0.15*(-py+(height-mouseY)));
translate(width/2, height/2, 0);
fill(foregroundColor);
drawK();
pushMatrix();
translate(0, 0, 1);
translate(0.75 * (px-width/2), -0.75 * (py-height/2), 0);
translate(0.75 * (px-width/2), -0.75 * (py-height/2), 0);
rotateZ(atan2(-(py-height/2), (px-width/2)) + PI/2);
rotateX(PI);
rotateZ(-(atan2(-(py-height/2), (px-width/2)) + PI/2));
fill(foregroundColor2);
drawK();
popMatrix();
translate(0.75 * (px-width/2), -0.75 * (py-height/2), 2);
rotateZ(atan2(-(py-height/2), (px-width/2)) + PI/2);
fill(backgroundColor);
beginShape(QUADS);
vertex(-640, 0);
vertex( 640, 0);
vertex( 640, -360);
vertex(-640, -360);
endShape();
popMatrix();
}
void initParticle(float _mass, float _drag, float ox, float oy) {
px = ox;
py = oy;
pv2 = 0.0;
pvx = 0.0;
pvy = 0.0;
pa2 = 0.0;
pax = 0.0;
pay = 0.0;
pMass = _mass;
pDrag = _drag;
}
void iterateParticle(float fkx, float fky) {
// iterate for a single force acting on the particle
pfx = fkx;
pfy = fky;
pa2 = pfx*pfx + pfy*pfy;
if (pa2 < 0.0000001) {
return;
}
pax = pfx/pMass;
pay = pfy/pMass;
pvx += pax;
pvy += pay;
pv2 = pvx*pvx + pvy*pvy;
if (pv2 < 0.0000001) {
return;
}
pvx *= (1.0 - pDrag);
pvy *= (1.0 - pDrag);
px += pvx;
py += pvy;
}
void drawK() {
pushMatrix();
scale(1.5);
translate(-63, 71);
beginShape(QUADS);
vertex(0, 0, 0);
vertex(0, -142.7979, 0);
vertex(37.1992, -142.7979, 0);
vertex(37.1992, 0, 0);
vertex(37.1992, -87.9990, 0);
vertex(84.1987, -142.7979, 0);
vertex(130.3979, -142.7979, 0);
vertex(37.1992, -43.999, 0);
vertex(77.5986-.2, -86.5986-.3, 0);
vertex(136.998, 0, 0);
vertex(90.7988, 0, 0);
vertex(52.3994-.2, -59.999-.3, 0);
endShape();
//translate(63, -71);
popMatrix();
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

@@ -1,101 +0,0 @@
import processing.core.*;
import java.applet.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.text.*;
import java.util.*;
import java.util.zip.*;
import java.util.regex.*;
public class Typing extends PApplet {
/**
* Typing (Excerpt from the piece Textension)
* by Josh Nimoy.
*
* Click in the window to give it focus.
* Type to add letters and press backspace or delete to remove them.
*/
int leftmargin = 10;
int rightmargin = 20;
String buff = "";
boolean didntTypeYet = true;
public void setup()
{
size(640, 360, P3D);
textFont(loadFont("Univers45.vlw"), 25);
}
public void draw()
{
background(176);
if((millis() % 500) < 250){ // Only fill cursor half the time
noFill();
}
else{
fill(255);
stroke(0);
}
float rPos;
// Store the cursor rectangle's position
rPos = textWidth(buff)+leftmargin;
rect(rPos+1, 19, 10, 21);
// Some instructions at first
if(didntTypeYet){
fill(0);
//text("Use the keyboard.", 22, 40);
}
fill(0);
pushMatrix();
translate(rPos,10+25);
char k;
for(int i=0;i<buff.length();i++){
k = buff.charAt(i);
translate(-textWidth(k),0);
rotateY(-textWidth(k)/70.0f);
rotateX(textWidth(k)/70.0f);
scale(1.1f);
text(k,0,0);
}
popMatrix();
}
public void keyPressed()
{
char k;
k = (char)key;
switch(k){
case 8:
if(buff.length()>0){
buff = buff.substring(1);
}
break;
case 13: // Avoid special keys
case 10:
case 65535:
case 127:
case 27:
break;
default:
if(textWidth(buff+k)+leftmargin < width-rightmargin){
didntTypeYet = false;
buff=k+buff;
}
break;
}
}
static public void main(String args[]) {
PApplet.main(new String[] { "Typing" });
}
}
@@ -1,81 +0,0 @@
/**
* Typing (Excerpt from the piece Textension)
* by Josh Nimoy.
*
* Click in the window to give it focus.
* Type to add letters and press backspace or delete to remove them.
*/
int leftmargin = 10;
int rightmargin = 20;
String buff = "";
boolean didntTypeYet = true;
void setup()
{
size(640, 360, P3D);
textFont(loadFont("Univers45.vlw"), 25);
}
void draw()
{
background(176);
if((millis() % 500) < 250){ // Only fill cursor half the time
noFill();
}
else{
fill(255);
stroke(0);
}
float rPos;
// Store the cursor rectangle's position
rPos = textWidth(buff)+leftmargin;
rect(rPos+1, 19, 10, 21);
// Some instructions at first
if(didntTypeYet){
fill(0);
//text("Use the keyboard.", 22, 40);
}
fill(0);
pushMatrix();
translate(rPos,10+25);
char k;
for(int i=0;i<buff.length();i++){
k = buff.charAt(i);
translate(-textWidth(k),0);
rotateY(-textWidth(k)/70.0);
rotateX(textWidth(k)/70.0);
scale(1.1);
text(k,0,0);
}
popMatrix();
}
void keyPressed()
{
char k;
k = (char)key;
switch(k){
case 8:
if(buff.length()>0){
buff = buff.substring(1);
}
break;
case 13: // Avoid special keys
case 10:
case 65535:
case 127:
case 27:
break;
default:
if(textWidth(buff+k)+leftmargin < width-rightmargin){
didntTypeYet = false;
buff=k+buff;
}
break;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB