<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?action=history&amp;feed=atom&amp;title=GMU%3AProcessing_im_Park%2FEmilio_Aguas%2FCode_Pond_Effect</id>
	<title>GMU:Processing im Park/Emilio Aguas/Code Pond Effect - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?action=history&amp;feed=atom&amp;title=GMU%3AProcessing_im_Park%2FEmilio_Aguas%2FCode_Pond_Effect"/>
	<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=GMU:Processing_im_Park/Emilio_Aguas/Code_Pond_Effect&amp;action=history"/>
	<updated>2026-04-27T15:22:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=GMU:Processing_im_Park/Emilio_Aguas/Code_Pond_Effect&amp;diff=77883&amp;oldid=prev</id>
		<title>EmilioAguas: Created page with &quot;====--- Processing3.0 Code--- ====  &lt;source lang=&quot;java&quot;&gt;   import processing.video.*;  Capture video; int signal = 0; ArrayList frames = new ArrayList();  void setup() {   size(6...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.uni-weimar.de/kunst-und-gestaltung/wiki/index.php?title=GMU:Processing_im_Park/Emilio_Aguas/Code_Pond_Effect&amp;diff=77883&amp;oldid=prev"/>
		<updated>2016-01-25T21:27:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;====--- Processing3.0 Code--- ====  &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;   import processing.video.*;  Capture video; int signal = 0; ArrayList frames = new ArrayList();  void setup() {   size(6...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;====--- Processing3.0 Code--- ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import processing.video.*;&lt;br /&gt;
&lt;br /&gt;
Capture video;&lt;br /&gt;
int signal = 0;&lt;br /&gt;
ArrayList frames = new ArrayList();&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  size(640, 480);&lt;br /&gt;
  video = new Capture(this, width, height);&lt;br /&gt;
   video.start();  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void captureEvent(Capture camera) {&lt;br /&gt;
  camera.read();&lt;br /&gt;
  &lt;br /&gt;
  // Copy the current video frame into an image, so it can be stored in the buffer&lt;br /&gt;
  PImage img = createImage(width, height, RGB);&lt;br /&gt;
  video.loadPixels();&lt;br /&gt;
  arrayCopy(video.pixels, img.pixels);&lt;br /&gt;
  &lt;br /&gt;
  frames.add(img);&lt;br /&gt;
  &lt;br /&gt;
  // Once there are enough frames, remove the oldest one when adding a new one&lt;br /&gt;
  if (frames.size() &amp;gt; height/2) {&lt;br /&gt;
    frames.remove(0);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void draw() {&lt;br /&gt;
 // Set the image counter to 0&lt;br /&gt;
 int currentImage = 0;&lt;br /&gt;
 &lt;br /&gt;
 loadPixels();&lt;br /&gt;
  &lt;br /&gt;
  // Begin a loop for displaying pixel rows of 4 pixels height&lt;br /&gt;
  for (int y = 0; y &amp;lt; video.height; y+=5) {&lt;br /&gt;
    // Go through the frame buffer and pick an image, starting with the oldest one&lt;br /&gt;
    if (currentImage &amp;lt; frames.size()) {&lt;br /&gt;
      PImage img = (PImage)frames.get(currentImage);&lt;br /&gt;
      &lt;br /&gt;
      if (img != null) {&lt;br /&gt;
        img.loadPixels();&lt;br /&gt;
        &lt;br /&gt;
        // Put 4 rows of pixels on the screen&lt;br /&gt;
        for (int x = 0; x &amp;lt; video.width; x++) {&lt;br /&gt;
          pixels[x + y * width] = img.pixels[x + y * video.width];&lt;br /&gt;
          pixels[x + (y + 1) * width] = img.pixels[x + (y + 1) * video.height];&lt;br /&gt;
          pixels[x + (y + 2) * width] = img.pixels[x + (y + 1) * video.width];&lt;br /&gt;
          pixels[x + (y + 3) * width] = img.pixels[x + (y + 1) * video.width];&lt;br /&gt;
          pixels[x + (y + 4) * width] = img.pixels[x + (y + 1) * video.height];&lt;br /&gt;
        }  &lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      // Increase the image counter&lt;br /&gt;
      currentImage++;&lt;br /&gt;
       &lt;br /&gt;
    } else {&lt;br /&gt;
      break;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  updatePixels();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>EmilioAguas</name></author>
	</entry>
</feed>