Processing Special Effects: Understanding Special Effects in Processing
--D. Thiebaut (talk) 10:48, 2 December 2014 (EST)
Source
import processing.core.PApplet;
public class ProcessingDemo1 extends PApplet {
public void setup() {
size( 800, 600 );
smooth();
}
public void draw() {
background( 255, 255, 200 );
fill( 255, 255, 255 );
stroke( 0, 0, 0 );
ellipse( mouseX, mouseY, 30, 30 );
fill( 0, 0, 0 );
text( "" + frameCount, mouseX + 30, mouseY );
}
}
Suggested Modifications
- Suggested Mods:
- comment out background()
- use frameCount%30
- make radius of circle = frameCount%30
- make background color = framecount%256