Skip to content
Eamonn Bell edited this page Mar 26, 2016 · 81 revisions

Pre-requisites

If you can complete this before the workshop, great!

Download and install Processing 2.2.1:

Please don't use any of the later or earlier versions.

Install the Peasycam library

You can install the latest Peasycam from within Processing via the menus

 Sketch > Import Library... > Add Library...

A note on this workshop

  • The goal of the workshop is to produce a 3D visualization of a toy dataset of Twitter status
  • The main way I will test your understanding of the material covered so far is to ask you to tweak the code examples I give in some way to change the output
  • If you're stuck - don't worry! The workshop is designed to give you a taste of what's possible with Processing and to encourage you to follow up if you find it interesting.

Exercise 0

A Processing sketch is not just a single file. It's:

  • a main sketch file: SKETCH_NAME.pde
  • other .pde files defining custom classes
  • other .java files and data files
  • ...all inside a folder that has to be called SKETCH_NAME

You can think of Processing as a subset of Java. So if you know Java, you know most Processing syntax. If you don't, no worries!

❓ Before you run the ex0 sketch, what do you think it does?

❓ Run the ex0 sketch with the menu (or Ctrl-R). What does it do?

print_ln() is a function. We know that 'cause it has parentheses in the mix. It takes stuff and sends it to the "console", which is the lower part of the Processing environment.

📖 Modify the code so that it sends the text Hello world! to the console ten times in a row. Be as clever or as straightforward as you like.

Exercise 1

We're done with the ex0 sketch. Close it out and open up the ex1 sketch by finding the right folder and opening up the sketch code.

Any more, I'm just going to assume that when we move on to Exercise n, you close down everything and open up the sketch exn.

Clone this wiki locally