Walking Lines 2

Walking lines 2Continuing on from the original walking lines I did in Processing, I went on to develop this version of it. This is done effectively the same way as the original, but the code is cleaner and it provides for more variation. It also runs slower.

This version should allow further development to make the lines even more random by separating all the variables, where the original was more limited since the numbers were largely defined within the line parameters.

This version is also technically more stochastic then the first one as well as the lines are added to and built on using the += command to add the new line position to the previous line position. Unfortunately this still draws a new line every frame that is not necessarily joined to the line from the previous frame.

float x = random(width);
float y = random(height);
float x2 = random(width);
float y2 = random(height);

void setup()
size(400, 400);

void draw()
x += int(random(width*2)-width);
y += int(random(height*2)-height);
x2 += int(random(width*2)-width);
y2 += int(random(height*2)-height);
line(x, y, x2, y2);

Tags: , , ,

One Response to “Walking Lines 2”

  1. […] one i could review now is the one by Matthew Brown. It is not really what i call a piece of work. Its more like a small practice. Anyways, his […]

Leave a Reply