4 more days and i only found 2 other people who updated their blog (anything which is posted from july onwards). No other source was told so i took the urls of the blogs used in the previous semester.
The 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 practice is on the random walk which was discussed in week 2’s tutorials. Since there isn’t even much to review, i would supply some suggestions to his practice instead (assuming he is not fluent with programming).
His sample code:
float x = random(width);
float y = random(height);
float x2 = random(width);
float y2 = random(height);
void setup()
{
size(400, 400);
strokeWeight(10);
smooth();
background(100);
frameRate(12);
}
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);
stroke(random(255));
line(x, y, x2, y2);
}
Unfortunately this still draws a new line every frame that is not necessarily joined to the line from the previous frame.
float x2 = 0;
float y2 = 0;
float x = random(width);
float y = random(width);
float tempx = 0;
float tempy = 0;
void setup()
{
size(400, 400);
strokeWeight(10);
smooth();
background(100);
frameRate(12);
}
void draw()
{
x2 = random(-width, width);
y2 = random(-height. height);
stroke(random(255));
line(x ,y, x2, y2);
x = x2;
y = y2;
}
August 21, 2008 at 10:51 am
[...] I received some feedback on my earlier versions of the walking lines in the form of a trackback from Alex. [...]