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
8 changes: 8 additions & 0 deletions BasicImages/BasicImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
PImage dolphin;

void setup () {
size(800,600);
dolphin= loadImage("Dolphin.jpg");
}
void draw() {
image (dolphin, 0, 0, width, height);
}
Binary file added BasicImages/data/Dolphin.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions FilteringImages/FilteringImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
PImage dolphin;

void setup () {
size(800,600);
dolphin= loadImage("Dolphin.jpg");
}
void draw() {

image (dolphin, 0, 0, width, height);
filter(POSTERIZE,5);
}
30 changes: 30 additions & 0 deletions IndependentImagePractice/IndependentImagePractice.pde
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
PImage dolphin, ocean;
int x, y, vx, vy;
float angle;

void setup() {
size(1200, 800);
dolphin=loadImage("dolphin.png");
ocean=loadImage("ocean.jpg");
x=0;
y=2*height/3;
vx=5;
vy=10;
angle = -PI/8;
}

void draw() {
image(ocean, 0, 0, width, height);
//line(0,height/3,width,height/3);
translate(x, y);
rotate(angle);
image(dolphin, 0, 0);
x+=vx;
y-=vy;
if (y<=height/8 || y>=height-100) {
vy*=-1;
angle*=-1;
}
if (x>width) {
x=0;
}
}
Binary file added IndependentImagePractice/data/dolphin.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/ocean.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.