Osion kuvaus

  • Recap

    First, let's go through the topics we've covered so far and think of when we would need them.

    PImage

    PImages let us load and display bitmap images (jpg/png/gif/tga). You can add images to your sketch through Sketch – Add File. You can also download them directly from URLs, but then they obviously won’t work, if you don’t have an Internet connection. Example images for today: player.jpg and football.png. How to load images and display them on screen: images.pde.

    Debugging exercise

    Download the following sketch: mousefollowbuggy.pde and fix it! There are ten errors altogether: some of them just minor typos and some more conceptual problems. Here’s the fixed one: mousefollowfixed.pde

    Paint program(!)

    Putting everything we've learned so far into use: let's make a simple paint program that lets us draw with different colors and exit by clicking a button.

    Homework

    Make something funny, experimental or creative using PImage and everything we've learned so far :)

    Here's what I did: fall.pde and the pic: raindrop-transparent-7.png