Processing
Aus ProgrammingWiki
Wiki-Quelltext dieser Seite.
<language>Processing</language>
Was ist Processing?
Kurzübersicht zu Processing
Grundlegender [[Aufbau von Processing-Anwendungen]]
[[Datentypen in Processing]]
Processing funktioniert im Wiki leider nicht so richtig schön :-(
<eval id="4d2adea88fbb8">
</eval>
<eval id="4c0e4ff8da984">
a = new processing.core.PApplet();
a.init();
float radius = 50.0;
int X, Y;
int nX, nY;
int delay = 16;
void setup() {
a.size(300,300);
a.background(0);
a.line(1,1,100,100);
a.stroke(10,10);
X = a.width / 2;
Y = a.width / 2;
nX = X;
nY = Y;
}
void draw() {
radius = radius + a.sin( a.frameCount / 4 );
X+=(nX-X)/delay;
Y+=(nY-Y)/delay;
a.background( 100 );
a.fill( 0, 121, 184 );
a.stroke(255);
a.ellipse( X, Y, radius, radius );
}
frame = new JFrame( "My Frame" );
frame.setLocation(200, 200);
frame.setSize(300, 300);
frame.add(a);
frame.visible = true;
setup();
draw();
</eval>