kwartzlab makerspace

Feb
24

Processing rocks!

By

Processing (http://processing.org) is a Java-based graphical programming language. Great for getting instant feedback and making pretty pictures.

IDE

The IDE is the same one that the Arduino project uses. Not a lot of features, but it’s quick and works well.

planets1

I wrote a simple particle gravity app, and it animates really smoothly. I’m looking forward to using it to make more eye candy!

App is attached as “planets.txt”, rename to “planets.pde” for the Processing IDE to pick it up.

3 Comments
  1. jlamothe

    I’m a little confused about the syntax of your code here. Perhaps you can explain it to me.

    You’ve got: `planets[i] = new Planet();` indicating that `planets[i]` is a pointer to an object of class `Planet`.
    On the following line, you’ve got: `planets[i].mass = 1`. Why does this compile? Shouldn’t it be `planets[i]->mass = 1`?

  2. Darcy Casselman

    Processing is its own language, that happens to look a lot like C++. Kinda like the arduino. Processing is not C++.

  3. amackie

    Yup, dcassel above is right. It’s very close to Java in that members are all assumed to be pointers, but are accessed with “.” instead of “->”. It also deals with and disposes of allocated memory like Java.

Leave a Comment