GDV P.2.2.1 Stupid agents

The original title of this chapter in the Generative Design book is: Dumb agents. But I have changed that for this blog because I liked it better this way. The starting point for this chapter’s assignment was: During each drawing operation, one of the eight possible directions is randomly selected for the next step. Steps are made by adding or subtracting a predetermined value (step size) to the current position’s coordinates. The circle is finally drawn at the new position. This is how it was described in the Generative Design Book. This chapter uses two programs. And here is the code and image for the first program.
http://www.generative-gestaltung.de/P_2_2_1_01

I would like to introduce two new things. The homepage of my loftmatic site. Every time I work on a chapter I enlarge the best image to be put on the homepage. If you click that image you end up at the chapter’s page with all variations of that chapter. A small explanation of what I did and links to the ‘working’ program and code. If the code works in Processing but does not in JavaScript I just display the code on the screen.

As a first challenge I inverted everything. Background from white to black. The (stupid) agent is now displayed in white.
P_2_2_1_01_GDV_01

Introduced no fill. Added a stroke to the ellipses with a very low transparency level.
P_2_2_1_01_GDV_02

Replaced the ellipses with rectangles.
P_2_2_1_01_GDV_03

This example grows rather slow because it has a very low transparency. And instead of ellipses I used a quarter of an ellipse. Wow! I now see that I have made a mistake. When you press the backspace or delete key it erases the image. That’s what it supposed to do but it makes the background white instead of black.
P_2_2_1_01_GDV_04

Replaced the arcs by rectangles.
P_2_2_1_01_GDV_05

And here is the original code and image for the second program.
http://www.generative-gestaltung.de/P_2_2_1_02

Changed that mistake when clearing the image that everything turns white. If you press the backspace or delete key you end up with a black background. Enlarged all ellipses. And when you hit the 1, 2 or 3 key you get different colors after 100 ellipses are displayed. I also commented out some lines. So the agents will now only walk in the NORTH and NORTHEAST directions.
P_2_2_1_02_GDV_01

Commented out some other program lines. So the agents will now walk only in the NORTH, EAST or SOUTHEAST directions.
P_2_2_1_02_GDV_02

In this version the agents will only walk in the NORTH, EAST and SOUTH directions.
P_2_2_1_02_GDV_03

Here the agents travel NORTH, SOUTHWEST, WEST or NORTHWEST.
P_2_2_1_02_GDV_04

And as a last try the agents travel only NORTH, EAST, WEST or NORTHWEST
P_2_2_1_02_GDV_05

I thought that I could get more out of the program. So I continued a little until I thought the program developed a little different. So I changed the background color of the agents into shades of green. And around each 400th agent it displays an agent without transparency.
P_2_2_1_03_GDV_01

Changed the background color of the agents into shades of red.
P_2_2_1_03_GDV_02

Commented out some lines. Agents now only stumble NORTH, EAST, SOUTHEAST, SOUTH, WEST and NORTHWEST.
P_2_2_1_03_GDV_03

Commented out some other lines. The agents are now running in the NORTH, EAST, SOUTHWEST and WEST direction.
P_2_2_1_03_GDV_04

Removed all comment-out lines. Made the background agents shades of blue. And introduced some randomness in the diameter of the agents (the ones which are displayed without any transparency).
P_2_2_1_03_GDV_05

I found that I still could go a step further. Just forget about the individual dots. But leave the positioning intact. Exaggerate the ellipses by making them very wide. Almost like they look like lines. In this case horizontal lines. Now here JavaScript does not a very fine job. In fact it does not work at all. That’s why I only display the Processing code and no image. And that is the case for the next programs (except P_2_2_1_04_GDV_04). I tried to find where  I made the mistake but I could not find it. And I would like to continue with my study of Processing. I do not want to spend time on looking for mistakes (I made?) by converting code from Processing to JavaScript. So knowing that… all programs are running fine in Processing 2. Here is the code.
P_2_2_1_04_GDV_01

Again I exaggerated the ellipses. But in this case vertical instead of horizontal.
P_2_2_1_04_GDV_02

Here I exaggerated the ellipses in both horizontal and vertical ways.
P_2_2_1_04_GDV_03

And yes! This one is working in JavaScript! I have no clue why this one works and the other ones don’t. Its vertical lines again. But it gives a totally different impression as P_2_2_1_04_GDV_02 because I decreased the stepsize of the agents. The longer you let it run the better the image gets. Hitting the 1, 2 and 3 keys is also helpfull for getting the image better.
P_2_2_1_04_GDV_04

Here I used horizontal and vertical ellipses to get a cross-like image. Rotated some ellipses for some 45 degrees and one other for 135 degrees.
P_2_2_1_04_GDV_05

Well I think I could continue for a while but I would like to stop here with the stupid agents. I will continue with the next chapter about intelligent agents. Lets see where we end up.

Henk Lamers

Advertisements

Comments? Leave a reply.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s