In todays workshop, I developed my processing skills and learnt about nested for loops, conditional statements and rotation. Here are some examples…
In the above example, the squares randomly change size and colour. From this, I learnt how to use integers and floats, as well as about using the colour mode HSB (Hue, Saturation, Brightness).
In the above example, the left mouse click draws ellipses and randomly generates different colours. The right mouse click takes an image of the preview and saves it in the selected folder. From this, I learnt how to do conditional statements for the different mouse click variables. Also, I learnt about modulus – if no modulus was set then the ellipses continues to get bigger and bigger. Setting the modulus restricts this so that when it reaches a certain size it reverts back to the original size.
In the above example, the rectangle randomly rotates around and changes hue colour. I used three integers to vary the rotation, size and colour. I also applied modulus to the integers so there were limits as to what size the rectangles reaches and the range of colours.
I experimented with the rotate examples by changing the fill, integers and modulus as well as using a triangle instead. I then incorporated the rotation elements into a condition statement, so that when you right click you get a rotating square and when you left click you get a rotating triangle:
Learning about for loops and conditional statements was particularly important as in order to advance my processing skills I need to be confident with the basics. Most complex examples I have looked at include these features within, so learning this was essential in order for me to progress with processing and create my interactive piece.