One of the applications on OpenProcessing which caught my attention was one posted by Alasdair Turner entitled 'Emergent Voronoi Diagram'. The application is described as 'an implementation of an emergent Voronoi diagram following an algorithm'. Here is the application screen as seen on OpenProcessing:
When the ellipses are clicked on, the collection of coloured dots swarm the page and cover the blank spaces. They then slowly disperse off the page during periods of time where the ellipses are not prompted. The first part of the code that I plan to look into are the parts that are already familiar to me, such as the colours and shapes of the code. After looking at the code for this application, I'm assuming that this section corresponds to that part...
By changing the background colour, the stroke tendencies, the fill colour and the ellipse co-ordinates, I can therefore change the appearance of the application. I chose to make obvious changes to the code so that the differences were obvious. Therefore I made the background black with a white stroke mark and increased the sizes of the smaller dots so that they were a similar size to the still ellipses. This was the code and the application screen shot after it was changed...
The next section of the code I want to understand is this section...
When the ellipses are clicked on, the collection of coloured dots swarm the page and cover the blank spaces. They then slowly disperse off the page during periods of time where the ellipses are not prompted. The first part of the code that I plan to look into are the parts that are already familiar to me, such as the colours and shapes of the code. After looking at the code for this application, I'm assuming that this section corresponds to that part...
By changing the background colour, the stroke tendencies, the fill colour and the ellipse co-ordinates, I can therefore change the appearance of the application. I chose to make obvious changes to the code so that the differences were obvious. Therefore I made the background black with a white stroke mark and increased the sizes of the smaller dots so that they were a similar size to the still ellipses. This was the code and the application screen shot after it was changed...
The next section of the code I want to understand is this section...
I already know what will happen if I change to size, colour mode and smoothness so this was the first section of the code that I changed in order to make the application smaller, with a different colour scheme and without the smooth setting. I then changed the values for nodes, colours and particles to see how this changed the application. This was the altered code and the visible changes it made...
I can now see that by increasing the new pVector of the nodes by a scale of 10 and decreasing the newcolour and the newpVector of the particles by a scale of 10, there was an increased number of particles was reduced. This was made apparent by the fact that the particles took a lot more time to move off of the screen. To confirm this, I then reduced the newcolour and newpVector values (which had to be reduced to equal values otherwise the code would not work) and found that there were very few particles on the screen. Here is a screenshot of when both these values were set at 100 (rather than the initial 4000).
Another section of the code which I was unfamiliar with was the following...
But after experimenting with it for a bit, I found that increasing the frame rate of the code increased the speed in which the particles moved. It was initially set at 200 but by increasing it to 400 hundred, the speed of the particles doubled and in the same way, by reducing the value to 10, the particles were practically stationary. I tried removing and adding value to the reset(); code but I found that by doing this, Processing would not play the code as an error kept arising.
The Vector Field
The section of code which I find the hardest to understand is what the creator refers to as the vector field. Here is the code:
By changing the code values to the following...
The movement of the application was stopped and the code produced an image of still ellipses and particles. On continuing to change the values of these numbers, I found that all variations I tried either resulted in an error or the same product as I found before - a still image. I checked the reference on the Processing website but couldn't find anything on vectors and vector fields so I have been unable to determine exactly what this code means and how I can alter it in a controlled way. Other than this, I found the code for this application was a lot easier to understand than I expected given the level of movement it produced - this process has also made me realise exactly how much hard work and imagination goes into computer coding.











No comments:
Post a Comment