my digital playground

First experiences with ‘Processing’

by Reto Vogel on Sep.19, 2009, under HSLU, Multimediatechnik, Processing, Programming

Today in ‘Multimediatechnik’ we had the exercise to write some processing apps.

Processing is an Open-Source programming language and integrated development environment built for the electronic arts and visual design communities, which aims to teach the basics of computer programming in a visual context, and to serve as the foundation for electronic sketchbooks.

The first two tasks were about drawing some lines. This was quite easy. Drawing some random lines can be realised with this simple code:

size(500,500);
background(100);
fill(255);
for (int i=0; i<100; i++) {
line (random(width), random(height), random(width), random(height));
}

Rotating globe

Rotating globe

The third tasks was about animation. We had to make an easy animation with serveral pictures. The result is a rotating globe with some stars around. A click changes the direction of the rotation. Through pressing ‘S’ it’s possible to take a screenshot and save it into a jpg-file.

Funnily enough, the stars won’t be displayed in the implemented version … I don’t know why ’cause it works when it is launched directly.

Implemented Applet (or download below):

Download source code here

Download compiled jar-file here

Bookmark, print, and share:
  • Print
  • PDF
  • Add to favorites
  • Digg
  • Facebook
  • del.icio.us
  • StumbleUpon
  • MySpace
  • Live
  • Google Bookmarks
:, ,

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...

Archives

All entries, chronologically...