
The randomSeed method allows for patterns to be formed from the random numbers.


I achieved some pretty cool results by using brownian particles to create curves. I found this examples interesting because I was able to introduced the randomSeed method into the equation and began to see consistent patterns from the numbers that were randomly generated. This is a huge discovery for me because it provides a simple solution to get consistent results with the visuals that the particles are creating.
As I mentioned in a previous post, I said that I would provide some source for the ideas behind brownian movement. Here is a super basic example that provides a nice example of how simple the concept is:
// basic brownian movement
float xPos;
float yPos;
void setup()
{
size(200,200);
background(255);
fill(100);
yPos = height/2;
xPos = width/2;
}
void draw()
{
// randomly change the position on every cycle =====
yPos += random(-5,5);
xPos += random(-5,5);
ellipse(xPos, yPos, 10, 10);
}
0 Responses to “Brownian Curves”