diff --git a/BasicImages/BasicImages.pde b/BasicImages/BasicImages.pde index 8b13789..bacdf69 100644 --- a/BasicImages/BasicImages.pde +++ b/BasicImages/BasicImages.pde @@ -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); + //} +} \ No newline at end of file diff --git a/BasicImages/data/20061124jcn-2.jpg b/BasicImages/data/20061124jcn-2.jpg new file mode 100644 index 0000000..adc780e Binary files /dev/null and b/BasicImages/data/20061124jcn-2.jpg differ diff --git a/BasicImages/data/ax.png b/BasicImages/data/ax.png new file mode 100644 index 0000000..641c7be Binary files /dev/null and b/BasicImages/data/ax.png differ diff --git a/BasicImages/data/nice art.jpg b/BasicImages/data/nice art.jpg new file mode 100644 index 0000000..b6e6c7a Binary files /dev/null and b/BasicImages/data/nice art.jpg differ diff --git a/BasicImages/data/train.jpg b/BasicImages/data/train.jpg new file mode 100644 index 0000000..12e59b2 Binary files /dev/null and b/BasicImages/data/train.jpg differ diff --git a/FilteringImages/FilteringImages.pde b/FilteringImages/FilteringImages.pde index 8b13789..c95ec7a 100644 --- a/FilteringImages/FilteringImages.pde +++ b/FilteringImages/FilteringImages.pde @@ -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); + +} \ No newline at end of file diff --git a/FilteringImages/data/jc with puppies.jpg b/FilteringImages/data/jc with puppies.jpg new file mode 100644 index 0000000..5efd5c6 Binary files /dev/null and b/FilteringImages/data/jc with puppies.jpg differ diff --git a/IndependentImagePractice/IndependentImagePractice.pde b/IndependentImagePractice/IndependentImagePractice.pde index 8b13789..e57d45e 100644 --- a/IndependentImagePractice/IndependentImagePractice.pde +++ b/IndependentImagePractice/IndependentImagePractice.pde @@ -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); +} \ No newline at end of file diff --git a/IndependentImagePractice/data/d1.png b/IndependentImagePractice/data/d1.png new file mode 100644 index 0000000..cf1ad07 Binary files /dev/null and b/IndependentImagePractice/data/d1.png differ diff --git a/IndependentImagePractice/data/monet lillies.jpg b/IndependentImagePractice/data/monet lillies.jpg new file mode 100644 index 0000000..dd6d5fd Binary files /dev/null and b/IndependentImagePractice/data/monet lillies.jpg differ diff --git a/IndependentImagePractice/data/td11.jpg b/IndependentImagePractice/data/td11.jpg new file mode 100644 index 0000000..faca2fc Binary files /dev/null and b/IndependentImagePractice/data/td11.jpg differ diff --git a/IndependentImagePractice/data/td11.png b/IndependentImagePractice/data/td11.png new file mode 100644 index 0000000..13e3aef Binary files /dev/null and b/IndependentImagePractice/data/td11.png differ diff --git a/MaskingImages/MaskingImages.pde b/MaskingImages/MaskingImages.pde index 8b13789..7b7006a 100644 --- a/MaskingImages/MaskingImages.pde +++ b/MaskingImages/MaskingImages.pde @@ -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); +} \ No newline at end of file diff --git a/MaskingImages/data/20061124jcn-2.jpg b/MaskingImages/data/20061124jcn-2.jpg new file mode 100644 index 0000000..2bc5f2b Binary files /dev/null and b/MaskingImages/data/20061124jcn-2.jpg differ diff --git a/MaskingImages/data/jc with puppies.jpg b/MaskingImages/data/jc with puppies.jpg new file mode 100644 index 0000000..4eb31a6 Binary files /dev/null and b/MaskingImages/data/jc with puppies.jpg differ