Monday, 14 May 2012

Creative Coding, Project Three, Blog Three

I have now managed to make my coded snowflake thing explode!


Firstly I decided to try clean and condense my code a but as I had many repeated elements, being the layers of shapes around the cursor as each time I made a new layer I re-applied the same shapes in a different void just slightly further apart. However now I have related them using the power of voids.
Here's part of my original code where as you can see I have just more or less repeated it changing only 'prim' (the distance between them) and the 'shpsz' (shape size)


Here's my updated code. Here I have just repeated the previous void instead of the whole previous code and increased 'prim' and 'shpsz' by variables so they can easily be altered.

Also I have now been able to actually take a screen shot of my snowflake for the first time as I made it so once the cursor speed gets over a certain speed it stops spinning and won't disappear even if the cursor speed is decreased again.
Snowflake form.

However I have now since made it 'explode' instead of stop. Now, once it gets over a certain mouse speed which has been sustained for a given amount of frames the distance of the layers from the mouse position (prim) increases quickly making the snow flake explode off the screen. Also when this happens the screen turns red.

The next step is to have multiple snowflakes placed amongst the screen which interact in the same way.


No comments:

Post a Comment