This commit is contained in:
benfry
2011-01-26 19:22:19 +00:00
parent d3a18c7964
commit eb64b2d4fc
1234 changed files with 96518 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
// Example 06-01 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010
PImage img;
void setup() {
size(480, 120);
img = loadImage("lunar.jpg");
}
void draw() {
image(img, 0, 0);
}

View File

@@ -0,0 +1,18 @@
// Example 06-02 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010
PImage img1;
PImage img2;
void setup() {
size(480, 120);
img1 = loadImage("lunar.jpg");
img2 = loadImage("capsule.jpg");
}
void draw() {
image(img1, -120, 0);
image(img1, 130, 0, 240, 120);
image(img2, 300, 0, 240, 120);
}

View File

@@ -0,0 +1,15 @@
// Example 06-03 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010
PImage img;
void setup() {
size(480, 120);
img = loadImage("lunar.jpg");
}
void draw() {
background(0);
image(img, 0, 0, mouseX * 2, mouseY * 2);
}

View File

@@ -0,0 +1,16 @@
// Example 06-04 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010
PImage img;
void setup() {
size(480, 120);
img = loadImage("clouds.gif");
}
void draw() {
background(255);
image(img, 0, 0);
image(img, 0, mouseY * -1);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View File

@@ -0,0 +1,16 @@
// Example 06-05 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010
PImage img;
void setup() {
size(480, 120);
img = loadImage("clouds.png");
}
void draw() {
background(204);
image(img, 0, 0);
image(img, 0, mouseY * -1);
}

View File

@@ -0,0 +1,20 @@
// Example 06-06 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010
PFont font;
void setup() {
size(480, 120);
smooth();
font = loadFont("AndaleMono-36.vlw");
textFont(font);
}
void draw() {
background(102);
textSize(36);
text("Thats one small step for man...", 25, 60);
textSize(18);
text("Thats one small step for man...", 27, 90);
}

View File

@@ -0,0 +1,18 @@
// Example 06-07 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010
PFont font;
void setup() {
size(480, 120);
font = loadFont("AndaleMono-24.vlw");
textFont(font);
}
void draw() {
background(102);
text("Thats one small step for man...", 26, 30, 240, 100);
}

View File

@@ -0,0 +1,17 @@
// Example 06-08 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010
PFont font;
String quote = "Thats one small step for man...";
void setup() {
size(480, 120);
font = loadFont("AndaleMono-24.vlw");
textFont(font);
}
void draw() {
background(102);
text(quote, 26, 30, 240, 100);
}

View File

@@ -0,0 +1,17 @@
// Example 06-09 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010
PShape network;
void setup() {
size(480, 120);
smooth();
network = loadShape("network.svg");
}
void draw() {
background(0);
shape(network, 30, 10);
shape(network, 180, 10, 280, 280);
}

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 322 KiB

View File

@@ -0,0 +1,18 @@
// Example 06-10 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010
PShape network;
void setup() {
size(240, 120);
smooth();
shapeMode(CENTER);
network = loadShape("network.svg");
}
void draw() {
background(0);
float diameter = map(mouseX, 0, width, 10, 800);
shape(network, 120, 60, diameter, diameter);
}

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 322 KiB