Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions BasicImages/BasicImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
PImage a;
PVector loc, vel;
void setup() {
size(900, 600);
a=loadImage("nice art.jpg");
noCursor();
loc = new PVector(width/2, height/2);
vel = PVector.random2D();
}

void draw () {
background(250);
//tint
image(a, loc.x, loc.y, a.width*.3, a.height*.3);
loc.add(vel);
//if (loc.x + width>= width) {
// vel.x = -abs(vel.x);
//} else if (loc.x <= 0) {
// vel.x = abs(vel.x);
//}
//if (loc.y >= height) {
// vel.y = -abs(vel.y);
//} else if (loc.y <= 0) {
// vel.y = abs(vel.y);
//}
}
Binary file added BasicImages/data/20061124jcn-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BasicImages/data/ax.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BasicImages/data/nice art.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BasicImages/data/train.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions FilteringImages/FilteringImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
PImage a;
void setup() {
size(400, 516);
a=loadImage("jc with puppies.jpg");
noCursor();
}

void draw() {

image(a, 0, 0);
filter(GRAY);

}
Binary file added FilteringImages/data/jc with puppies.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions IndependentImagePractice/IndependentImagePractice.pde
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
//initialize images
PImage m, d;
//initialize vectors
PVector loc, vel, acc;
//initialize x
int x=0;
void setup() {
//canvas size
size(600, 600);
//load images
m=loadImage("monet lillies.jpg");
d=loadImage("d1.png");
//declare vectors
loc= new PVector(width/2, height/2);
vel = new PVector(random(-1, 1), random(-1, 1));
}

void draw() {
//draw image
image(m, 0, 0);
image(d, loc.x, loc.y);

//declare acc vector
acc= PVector.random2D();
acc.mult(.1);

//make dragonfly move randomly
loc.add(vel);
vel.add(acc);
vel.limit(1);

//wrap dragonfly's position
if (loc.x >= width) {
loc.x = 0;
//increase blur (of dragonfly and waterlilles)if dragonfly goes off screen and comes back
x=x+1;
} else if (loc.x + 150 <= 0) {
loc.x = width;
x=x+1;
}
if (loc.y >= height) {
loc.y = 0;
x=x+1;
} else if (loc.y + 150 <= 0) {
loc.y = height;
x=x+1;
}
//blur images
filter(BLUR, x);
}
Binary file added IndependentImagePractice/data/d1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/monet lillies.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/td11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/td11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions MaskingImages/MaskingImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
PImage a, b;
void setup() {
size(400, 400);
a=loadImage("jc with puppies.jpg");
b=loadImage("20061124jcn-2.jpg");
noCursor();
b.mask(a);
}

void draw() {
background(0, 200, 255);
image(b, 0, 0);
}
Binary file added MaskingImages/data/20061124jcn-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MaskingImages/data/jc with puppies.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.