I have entered the M.4.0 Attractors chapter. The starting points for all graphics in this chapter are points that can move and attractors that attract or repel these nodes. M.4.1 Starts with ‘Nodes’. Here is the summary from the Generative Design book: ‘When creating a virtual world in which attractive forces are simulated, at least two kinds of objects are needed: attractors (points that attract) and nodes (objects that are attracted). In principle, both attractors and nodes are simple points in space. The most important information is their position: x, y, and (in the event that they move in three-dimensional space) z-coordinates. They also have other properties and functions, which will be examined in more detail in the following pages. The first examples are based on a two-dimensional space, but it will be easy to shift into the third dimension later. An object that can move is now needed as the node. In addition to its position in the world (x, y), it is also assigned a velocity vector that specifies by how many pixels the position is offset in each frame. In the following example, a simple node class is created and a few instances from it are placed on the stage.’ Here is the original program:
I will shortly describe what I did and the link will redirect you to the Flickr page. I’ve started with increasing the node count from 20 to 2000. Changed the display size to 800 x 800. Made the background black. Reduced the size of the nodes to 1 x 1 pixels. At this moment I like to see very much nodes and very small. Also slowed down the damping to 0.005. And I changed the random velocity (or speed) to -1, 1.
Decreased the amount of node count to 1000. Increased the size of the nodes to ellipses of 10 pixels. Also removed the fill of the ellipses.
I would like to replace the ellipses by another shape. I created a function for that called newShape. To begin with I used three rectangles which are diagonally connected. Why rectangles? I have no idea. Sometimes you have to follow your intuition. The color scale ranges from white to blue. When running the program it has sometimes a 3d-ish quality. Which I noticed later.
Let‘s see what happens if I make these rectangles smaller. That gave me an interesting effect. What if I double the amount of rectangles in the newShape function. Huh? I got an Exception in thread “Animation Thread” java.lang.RuntimeException: Nothing left on the event queue. at processing.core.PApplet$InternalEventQueue.remove(PApplet.java:2569) at processing.core.PApplet.dequeueEvents(PApplet.java:2639) at processing.core.PApplet.handleDraw(PApplet.java:2317) at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:237) at processing.core.PApplet.run(PApplet.java:2177) at java.lang.Thread.run(Thread.java:744) in my console. But the program keeps running. And that is the most important thing for me. I also reduced the vertical movement. That makes the objects even more flag-like.
I could use a for loop for this newShape. Which gives me the possibility to make a longer flag-like shapes without using much repeating code. The red dot on top of the flags is outside the loop.
Increased the node count to 1000. And I used an S-shaped form for newShape. I also reduced the randomness for velocity.y (the vertical speed) to almost nothing (-0.001, 0.001). That is giving me horizontal movement only. Swapping those numbers with velocity.x gives me a vertical movement.
Used an m-based shape with the same vertical movement.
Replaced the m-shape with a double sized m-shape with more color. Not sure if that is a good combination of colors.
The newShape is now overlapping itself. Improved the shape by separating the original form from each other. Added a more colourful version too. And I added a Wimbledon color version. Which was not a great success (I think). So I reduced the amount of color variations. And ended with red-white-red-white colors. Also reduced the strokeweight to 1 pixel which makes the images smoother.
Used a horizontal wave existing out of bezier curves. I started with a white version but changed that into a version which uses only red and white.