Quote:Processing is an open source programming language and environment for people who want to program images, animation, and interactions. It is used by students, artists, designers, researchers, and hobbyists for learning, prototyping, and production. It is created to teach fundamentals of computer programming within a visual context and to serve as a software sketchbook and professional production tool. Processing is developed by artists and designers as an alternative to proprietary software tools in the same domain.
[java]
/**
* Mouse 2D.
* Processing Example
* Comments by Tony Targonski
*/
// initialize the environment
void setup()
{
// window size
size(200, 200);
// do not outline shapes
noStroke();
// RGB colour mode, 255 max colour, 100 max alpha
colorMode(RGB, 255, 255, 255, 100);
// draw Rectangles from the center, not (default) corner
rectMode(CENTER);
// set framerate to 30 FPS
frameRate(30);
}
// draw frame. Called once during each loop iteration
void draw()
{
// clear the background with 51/255 grey
background(51);
// set drawing colour to 255/255 grey, 80/100 alpha
fill(255, 80);
// draw two rectangles
rect(mouseX, height/2, mouseY/2+10, mouseY/2+10);
rect(width-mouseX, height/2, ((height-mouseY)/2)+10, ((height-mouseY)/2)+10);
}
[/java]
Seems like an easy language for drawing 2D animations on the screen. You also set the frame rate with a single function, which might be useful.
25/02/2008 06:48 PM
ZiNgA BuRgA
Smart Alternative
Posts: 17,022.2988 Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391 E-Pigs: 446.1274