Drawing text

Making my way through the Drawing text recipe from the Processing 2 Creative programming cookbook source code on GitHub. In this recipe I learned how to declare PFont objects for the fonts to be used in the Sketch and set the second parameter of the textFont function to determine the size of the text. For example, textFont (junction, 18). I also learned how to use: loadFont function to load the fonts into the PFont object draw function to draw lines of text text function to draw text to screen textAlign function to…

Working with images

Making my way through the Working with images recipe from the Processing 2 Creative programming cookbook source code on GitHub. In this recipe I learned how to: use the loadImage function to load an image from my data folder into my Sketch declare a boolean (pixelMode) for the if test use the image function to display the new images (dimensions specified in copWidth and copyHeight and areas specified by the pixel-swapping if test) in the window. I also learned about the get and set methods and how they can be used to…

Advertising inside Melbourne’s Metro Trains

An uncommon sight. Advertising on the inside one of  Melbourne’s Metro Trains. This could be a test for a possible revenue stream for the franchise operator of our suburban railway network. I’ve seen advertising on the outside of trains before, but never on the inside. This is new. Also, the irony of an advertising campaign for Melbourne Airport on a train network that currently doesn’t and probably never will connect to the airport isn’t lost on me.

Working with colours

Making my way through the Working with colours recipe from the Processing 2 Creative programming cookbook source code on GitHub. In this recipe I learned how to use the color function to create a variable of the type colour (c = colour variable), the stroke function to set the colour of the stroke, the fill function to set the fill colour of the shape. I also added an additional +130 to the height of displayHeight. I wanted the size and position of all the shapes to be relative to the window size…

Drawing basic shapes

Making my way through the Drawing basic shapes recipe from the Processing 2 Creative programming cookbook source code on GitHub. In this recipe I learned how to use the rect, ellipse, quad and triangle functions to draw basic geometric shapes. I also found it interesting how two for loops are used to create the grid background pattern. I’m curious to find out if this coding style is better or more efficient than a single for loop I used to create my grid background pattern. I guess I’ll find that out as I continue to…

Keyboard interaction

Making my way through the Keyboard interaction recipe from the Processing 2 Creative programming cookbook source code on GitHub. In this recipe I learned about using keyPressed, keyReleased and keyTyped functions to assign keys on the keyboard to execute code and also a bit more about if tests and declaring variables, particularly changing their values when specified keys are pressed.

css.php