GMU:Processing im Park/Dirk Wäsch: Difference between revisions

From Medien Wiki
No edit summary
No edit summary
 
(149 intermediate revisions by 2 users not shown)
Line 35: Line 35:
water
water
https://c1.staticflickr.com/6/5823/23745638646_0bc4248d58_c.jpg
https://c1.staticflickr.com/6/5823/23745638646_0bc4248d58_c.jpg


graffity_000
graffity_000
Line 65: Line 67:
graffity_009
graffity_009
https://c1.staticflickr.com/6/5695/23403888729_3caefaf24a_c.jpg
https://c1.staticflickr.com/6/5695/23403888729_3caefaf24a_c.jpg
spiral:
https://c2.staticflickr.com/2/1450/24046644509_878f822173_k.jpg
holes:
https://c2.staticflickr.com/2/1503/24306197242_987dbb54b2_k.jpg
tree_branches:
https://c2.staticflickr.com/2/1645/24414469465_48f8c9a72f_k.jpg
tree_structure:
https://c2.staticflickr.com/2/1613/23787677933_9fbc6caa77_k.jpg
star_side:
https://c2.staticflickr.com/2/1652/24331991181_e38f2e656d_k.jpg
star_front:
https://c2.staticflickr.com/2/1679/24388223986_8c78ec2991_k.jpg
ice:
https://c2.staticflickr.com/2/1449/24331989911_1044424084_k.jpg
footprints_1:
https://c2.staticflickr.com/2/1706/24046638749_967c24a535_k.jpg
footprints_2:
https://c2.staticflickr.com/2/1550/24046637559_34084db906_k.jpg
stonewall:
https://c2.staticflickr.com/2/1553/23787673213_aae1799fe2_k.jpg


Video 1:
Video 1:
Line 80: Line 118:
* Diese Fotos haben wir zunächst als Slideshow animiert.
* Diese Fotos haben wir zunächst als Slideshow animiert.


[[File:park_animation_400_225.gif||left]]  
[[File:park_animation_400_225.gif|left]]  


<br style="clear:both;">
<br style="clear:both;">


Quellcode auf OpenProcessing: [http://www.openprocessing.org/sketch/247448 sketch247448.pde] <br><br>
[http://www.uni-weimar.de/medien/wiki/index.php5?title=GMU:Processing_im_Park/Dirk_Wäsch/Code_Hausaufgabe_I Processing v3.0.0 Quellcode]
 
== Hausaufgabe II ==
 
* Image-Slicer
 
[[Image:image_slicer_720_405.png|left|400px]]
https://waesch.000webhostapp.com/ablage/images/Image-Slicer.gif
 
[http://www.uni-weimar.de/medien/wiki/index.php5?title=GMU:Processing_im_Park/Dirk_Wäsch/Code_Hausaufgabe_II Processing v3.0.0 Quellcode]
 
== Hausaufgabe III ==
 
* Animierter Mauszeiger
 
[[Image:brush_animation_720_405.png|thumb|left|400px]]
https://waesch.000webhostapp.com/ablage/images/Brush-Animation.gif
 
[http://www.uni-weimar.de/medien/wiki/index.php5?title=GMU:Processing_im_Park/Dirk_Wäsch/Code_Hausaufgabe_III Processing v3.0.0 Quellcode]
 
== Ausflug - Schlosspark Belvedere ==
 
*Fotos und Videos im Schlosspark Belverdere: [https://www.flickr.com/photos/137226701@N06/albums/72157661120668650 Bild- & Video-Uploads auf Flickr]
 
== Proccesing - Workshop-Wochenende I - Video & Sound ==


Processing 3.0 Quellcode:
Sounds aus der Parkhöhle:<br><br>
<source lang="java">
Ventilation: <flashmp3 id="Park3.mp3">https://waesch.000webhostapp.com/ablage/sound/Park1.mp3</flashmp3>
int numFrames = 9;  // The number of frames in the animation
<br style="clear:both;">
int frame = 0;
Seismische Kammer: <flashmp3 id="Park3.mp3">https://waesch.000webhostapp.com/ablage/sound/Park2.mp3</flashmp3>
PImage[] images = new PImage[numFrames];
<br style="clear:both;">
Automatische Tür: <flashmp3 id="Park3.mp3">https://waesch.000webhostapp.com/ablage/sound/Park3.mp3</flashmp3>
void setup()
<br style="clear:both;">
{
  size(720, 405);
  background(0, 0, 0);
 
  images[0] = loadImage("bridge.jpg");
  images[1] = loadImage("bridge_water.jpg");
  images[2] = loadImage("bridge-down.jpg");
  images[3] = loadImage("leaves.jpg");
  images[4] = loadImage("park.jpg");
  images[5] = loadImage("river.jpg");
  images[6] = loadImage("sky_leaves.jpg");
  images[7] = loadImage("sky_pinetree.jpg");
  images[8] = loadImage("water.jpg");


  frameRate(0.75);
== Hausaufgabe IV ==
}


* Soundboard
void draw()
{
  frame = (frame) % numFrames;  // Use % to cycle through frames
  image(images[frame], 0, 0, 720, 405);
 
  if (frame<9)
  { frame++;
  }
  else frame = 0;
}
</source> <br>


* Danach wurden die Fotos in ein Raster gesetzt.  
Beim Spazieren durch die Weimarer Parkhöhle
<br style="clear:both;">
[[Image:parkhoehle_.png|thumb|left|250px]]


[[Image:park_grid_300_300.png|thumb|left|250px]]


<videoflash type="youtube">jkKYZnJWWUQ|250|410|</videoflash>
<br style="clear:both;">
<br style="clear:both;">


Quellcode auf OpenProcessing: [http://www.openprocessing.org/sketch/267716 sketch267716.pde] <br><br>
[http://www.uni-weimar.de/medien/wiki/index.php5?title=GMU:Processing_im_Park/Dirk_Wäsch/Code_Hausaufgabe_V Processing v2.1.1 Quellcode]
 
== Proccesing - Workshop-Wochenende II - Video & Sound ==
 
Fotos bei der Mensa am Park: [https://www.flickr.com/photos/137226701@N06/albums/72157663612224255 Bild-Uploads auf Flickr]
 
== Hausaufgabe V ==


Processing 3.0 Quellcode:
* Pixel Sorting
<source lang="java">
size(300, 300);


PImage image1 = loadImage("sky_leaves.jpg");
Sortierung der Pixel nach Farbton
PImage image2 = loadImage("bridge.jpg");
PImage image3 = loadImage("tree.jpg");
PImage image4 = loadImage("water.jpg");
PImage image5 = loadImage("hole.jpg");
PImage image6 = loadImage("bridge.jpg");
PImage image7 = loadImage("leaves.jpg");
PImage image8 = loadImage("park.jpg");
PImage image9 = loadImage("river.jpg");
image(image1, 0, 0, 100, 100);
image(image2, 0, 100, 100, 100);
image(image3, 0, 200, 100, 100);
image(image4, 100, 0, 100, 100);
image(image5, 100, 100, 100, 100);
image(image6, 100, 200, 100, 100);
image(image7, 200, 0, 100, 100);
image(image8, 200, 100, 100, 100);
image(image9, 200, 200, 100, 100);
saveFrame("my_park_grid.jpg");
</source> <br>


== Hausaufgabe II ==
https://waesch.000webhostapp.com/ablage/images/Sorting_250.png
https://waesch.000webhostapp.com/ablage/images/Tile-Sorting.gif
<br style="clear:both;">


* Image-Slicer
[http://www.uni-weimar.de/medien/wiki/index.php5?title=GMU:Processing_im_Park/Dirk_Wäsch/Code_Workshop_II Processing v3.0.1 Quellcode]


[[Image:image_slicer_720_405.png|thumb|left|400px]]
== Hausaufgabe VI ==


* Video-Processing
Beim Spazieren im Schlosspark Belvedere habe ich meine Füße gefilmt, wie sie sich auf dem verschiedenen Untergrund bewegen.
<br>
<br style="clear:both;">
https://waesch.000webhostapp.com/ablage/images/Video-Processing.gif
<br style="clear:both;">
<br style="clear:both;">


Quellcode auf OpenProcessing: [http://www.openprocessing.org/sketch/267719 sketch267719.pde] <br><br>
[https://waesch.000webhostapp.com/ablage/video/walk.mp4 Original Video Download]
<br style="clear:both;">


Processing 3.0 Quellcode:
[http://www.uni-weimar.de/medien/wiki/index.php5?title=GMU:Processing_im_Park/Dirk_Wäsch/Code_Hausaufgabe_VI Processing v2.1.1 Quellcode]
<source lang="java">
// number of max slices
int maxSlices = 256;
Slice[] slice = new Slice[maxSlices];
// number of start slices
int n = 16;
float step = 2;
PImage img;   
 
void setup() {
  smooth();
  // background colour
  background(0);
  // load Image
  img = loadImage("park_008.jpg");
  // window size
  size(720,405);
  for (int i = 0; i < n; i++) {
    slice[i] = new Slice(int(i*img.width/n),int(img.width/n),img);
  }
    println(width);
    println(height);
}


void draw() {
== Hausaufgabe VII ==
  // background colour
  fill(0);
  // create rectangle with width and height of the image
  rect(0,0,width,height);
  for (int i = 0; i < n; i++) {
  slice[i].paint();
  }
}


void mousePressed() {
* Dot-Webcam
  save("pic.jpg");
  n = int(n*step);
  if(n > maxSlices | n < 4){
    step = 1/step;
    n = int(n*step*step);
  }
  for (int i = 0; i < n; i++) {
    slice[i] = new Slice(int(i*img.width/n),int(img.width/n),img);
  }
}


class Slice {
Die Kamera stellt die Bilder in Punkten dar.
  int xini;
<br>
  int xSize;
<br style="clear:both;">
  PImage img;
https://waesch.000webhostapp.com/ablage/images/Dot-Webcam.gif
  PImage imgSlice;   
<br style="clear:both;">
  float vel;
  float xVel;
  float xPos;
  float sign;
  float seed;
  float iter = 0;
  float t = 100;
     
  Slice(int xiniTemp, int xSizeTemp, PImage imgTemp) {
    xini = xiniTemp;
    xSize = xSizeTemp;
    img = imgTemp;
    imgSlice = createImage(xSize,img.height,ARGB);
    vel = 0;
    xVel = 0;
 
    sign = random(-1,1);
    sign = sign/abs(sign);
    seed = random(0,100);
    xPos = 0.5*(width-img.width) + xini + xVel + sign*noise(seed)*img.width/3;
 
    int p = 0;
    for (int i = 0; i < img.height; i++) {
      for (int j = 0; j < img.width; j++) {
        if((j >= xini) & (j < xini + xSize)){
          imgSlice.pixels[p] = img.pixels[j + i*img.width];
          p +=1;      
        }
      }
    }
  }
// create sliced image
  void paint() {
    image(imgSlice,xPos,0);
  }
 
}
</source> <br>


== Hausaufgabe III ==
[http://www.uni-weimar.de/medien/wiki/index.php5?title=GMU:Processing_im_Park/Dirk_Wäsch/Code_Hausaufgabe_VII Processing v2.1.1 Quellcode]


* Animierter Mauszeiger
== Hausaufgabe VIII ==


[[Image:brush_animation_720_405.png|thumb|left|400px]]
* Labyrinth


Bei dem Labyrinth wird versucht, so schnell wie möglich einen einfachen Weg aus der Mitte ins Freie oder in die Mitte zu finden.<br>Im zweiten Versuch habe ich die Wände durchbrochen um ans Ziel zu kommen.
<br style="clear:both;">
<br style="clear:both;">


Quellcode auf OpenProcessing: [http://www.openprocessing.org/sketch/267720 sketch267720.pde] <br><br>
[[Image:labyrinth_1.jpg|thumb|left|350px]]
[[Image:labyrinth_2.jpg|thumb|left|350px]]  
 
<br style="clear:both;">


Processing 3.0 Quellcode:
[http://www.uni-weimar.de/medien/wiki/index.php5?title=GMU:Processing_im_Park/Dirk_Wäsch/Code_Hausaufgabe_VIII Processing v3.0.1 Quellcode]
<source lang="java">
int n = 10;
PImage[] images = new PImage[n];
// offset to the reference point
int dx = 100;
int dy = 200;
// factor to slow our animation down
int slowdown = 4;
// zoom factor for our image
float zoom = 0.25;
// speed of rotation
float speed = 0.005;


void setup() {
== Finale Aufgabe ==
 
  // canvas size
  size(600, 400);
 
  // start out with a white background
  background(255);
 
  // load images into the array using a loop
  for(int i=0; i < n; i++) {
   
    // load the image
    images[i] = loadImage("graffity_00" + i + ".png");
   
    // Use the brightness of the image as its own alpha channel
    // As a result the dark parts of the image will become more transparent
    // Nota Bene: This is a hack :)
    images[i].mask(images[i]);
 
  }
 
}
void draw() {
  // let's set a transparent tint, for extra effect
  tint(255, 35);
  // save the current transformation matrix
  pushMatrix();
  // restore the previous transformation matrix
  popMatrix();
 
  // pick the index of an image
  int pick = (frameCount / slowdown) % n;
  // move to the mouse position
  translate(mouseX , mouseY);
  // scale the image
  scale(zoom);
 
  // move to the reference point
  translate(-dx, -dy);
 
  // get image from the array and display it
  image(images[pick], 0, 0);
}
</source> <br>


== Ausflug - Schlosspark Belvedere ==
*Animation einer fließenden Farbe


*Fotos und Videos im Schlosspark Belverdere: [https://www.flickr.com/photos/137226701@N06/albums/72157661120668650 Bild- & Video-Uploads auf Flickr]
Für ein Website-Projekt habe ich versucht, mit den Farbwerten die dominante Farbe "fließen" zu lassen.<br>Damit die Hintergrund-Animation nicht zu dominant wirkt, und um den Kontrast zu erhöhen, wird das Bild in Schwarz/Weiß umgewandelt.
<br>
<br style="clear:both;">
Zunächst habe die farbige Malerei eingescannt:
<br>
<br style="clear:both;">
https://waesch.000webhostapp.com/ablage/images/Ink-Image.jpg
<br style="clear:both;">
<br>
Danach habe ich skizziert wie das Bild in Schwarz/Weiß analysiert werden soll.


== Hausaufgabe IV ==
https://waesch.000webhostapp.com/ablage/images/Ink-Image-SW.jpg


* Video-Einbindung
<br style="clear:both;">
Mit dem Processing-Code wird das Bild in Schwarz-/Weiß umgewandelt und der dunkelste Schwartwert ermittelt.


Inhalt folgt später.
https://waesch.000webhostapp.com/ablage/images/Ink-Image-Animation.gif


== Proccesing - Workshop-Wochenende ==
<br>
<br style="clear:both;">
Zum Schluss habe ich die Animation als Hintergrund in die Website eingebunden.
<br>
<br style="clear:both;">
https://waesch.000webhostapp.com/ablage/images/Ink-Image-Animation-Website.gif
<br>
<br style="clear:both;">


Inhalt folgt später.
[http://www.uni-weimar.de/medien/wiki/index.php5?title=GMU:Processing_im_Park/Dirk_Wäsch/Code_Finale_Aufgabe Processing v3.0.1 Quellcode]

Latest revision as of 09:57, 2 July 2017

Dirk Wäsch

Meine Seite zum Kurs "Processing im Park".

Ausflug - Ilmpark

Fotos im Ilmpark: Bild-Uploads auf Flickr


Hausaufgabe I

  • Diese Fotos haben wir zunächst als Slideshow animiert.


Processing v3.0.0 Quellcode

Hausaufgabe II

  • Image-Slicer

Image-Slicer.gif

Processing v3.0.0 Quellcode

Hausaufgabe III

  • Animierter Mauszeiger

Brush-Animation.gif

Processing v3.0.0 Quellcode

Ausflug - Schlosspark Belvedere

Proccesing - Workshop-Wochenende I - Video & Sound

Sounds aus der Parkhöhle:

Ventilation: <flashmp3 id="Park3.mp3">https://waesch.000webhostapp.com/ablage/sound/Park1.mp3</flashmp3>
Seismische Kammer: <flashmp3 id="Park3.mp3">https://waesch.000webhostapp.com/ablage/sound/Park2.mp3</flashmp3>
Automatische Tür: <flashmp3 id="Park3.mp3">https://waesch.000webhostapp.com/ablage/sound/Park3.mp3</flashmp3>

Hausaufgabe IV

  • Soundboard

Beim Spazieren durch die Weimarer Parkhöhle


<videoflash type="youtube">jkKYZnJWWUQ|250|410|</videoflash>

Processing v2.1.1 Quellcode

Proccesing - Workshop-Wochenende II - Video & Sound

Fotos bei der Mensa am Park: Bild-Uploads auf Flickr

Hausaufgabe V

  • Pixel Sorting

Sortierung der Pixel nach Farbton

Sorting_250.png Tile-Sorting.gif

Processing v3.0.1 Quellcode

Hausaufgabe VI

  • Video-Processing

Beim Spazieren im Schlosspark Belvedere habe ich meine Füße gefilmt, wie sie sich auf dem verschiedenen Untergrund bewegen.

Video-Processing.gif

Original Video Download

Processing v2.1.1 Quellcode

Hausaufgabe VII

  • Dot-Webcam

Die Kamera stellt die Bilder in Punkten dar.

Dot-Webcam.gif

Processing v2.1.1 Quellcode

Hausaufgabe VIII

  • Labyrinth

Bei dem Labyrinth wird versucht, so schnell wie möglich einen einfachen Weg aus der Mitte ins Freie oder in die Mitte zu finden.
Im zweiten Versuch habe ich die Wände durchbrochen um ans Ziel zu kommen.


Processing v3.0.1 Quellcode

Finale Aufgabe

  • Animation einer fließenden Farbe

Für ein Website-Projekt habe ich versucht, mit den Farbwerten die dominante Farbe "fließen" zu lassen.
Damit die Hintergrund-Animation nicht zu dominant wirkt, und um den Kontrast zu erhöhen, wird das Bild in Schwarz/Weiß umgewandelt.

Zunächst habe die farbige Malerei eingescannt:

Ink-Image.jpg

Danach habe ich skizziert wie das Bild in Schwarz/Weiß analysiert werden soll.

Ink-Image-SW.jpg


Mit dem Processing-Code wird das Bild in Schwarz-/Weiß umgewandelt und der dunkelste Schwartwert ermittelt.

Ink-Image-Animation.gif



Zum Schluss habe ich die Animation als Hintergrund in die Website eingebunden.

Ink-Image-Animation-Website.gif

Processing v3.0.1 Quellcode