Random Spirals
June 6th, 2008
Based on the Triangle Flower example from the Processing learning basics site, I’ve come up with a rendered image that will generate a random, coloured spiral every time it loads. It’s similar to the appearance of a kaleidoscope. You can have a look at it online here.
At this point, to see a new spiral, you have to re-run the Java, or re-load the page rather than pressing a button, moving the mouse or anything like that. Hopefully I’ll be able to get that to work soon as I think it would look pretty cool if I could get it to change as you move the mouse over it, similar to the way a kaleidoscope changes as you move it around.
I suspect it is to do with the lack of a draw() function, but when I add it in and run the spiral() function from within the draw() function, it completely changes the way the spirals render and I haven’t yet been able to get it to behave correctly.
Recursively Generated Clouds - Continued
June 5th, 2008
Continuing on from the clouds I had generated earlier, I thought it would be pretty cool if I could get it to move and appear to grow.
Unfortunately, I haven’t been able to make it do that yet. I have however, gotten it to generate random cloud combinations and position them randomly on the canvas with semi-random colours based around reds, yellows and oranges.
It is available online here.
Recursively Generated Clouds
June 5th, 2008
I have been having a look at using recursion in Processing to tile things, however, I got a little bit sidetracked.
Going through the online learning basics, there are two recursion examples, “Recursion” and “Recursion 2“. In the first of these, recursion is used to have a circle repeat itself twice at half the original size inside itself, and continue doing this with each smaller circle until the level is no longer greater than 1. The level is basically the amount of times the function will call itself.
The second of these examples builds on the first, but instead of repeating the circle’s inside themselves, it generates random sizes and shades of circles in semi-random x and y co-ordinates around the main circle until the level is no longer greater than 1. The level again basically being how many times the function calls itself.
Experimenting with these two recursive functions, I combined the two to create a cartoonish cloud that slightly resembles a mushroom cloud which can be found online here.
The Draggable Box - Take 2
June 4th, 2008
As I mentioned on my previous version of the Draggable Box, I had not gotten it to retain the size or position of the box when the mouse buttons were released.
Using the mouseDragged() function, I have now fixed this.
The box no longer reverts back to moving around the screen and adjusting its size on it’s own. It stays whatever size and in whatever position the user places it.
It is available online here. Click and drag with the left mouse button to move the box, or click and drag with the right mouse button to change the size. Horizontal movement affects the width and vertical movement affects the height.
The Green Man
May 29th, 2008
Using a photo that I split up into 5 parts, I used the image import capabilities of Processing to create a Java animation of a green manikin.Have a look at it online here or the source code below.
