50000 Rectangles #19

50000 rectangles.

(Continued from 50000 Rectangles #18.) You might think that I looked at the Wikipedia examples, or an old statistics text book to find a cool two dimensional probability distribution. That is not how it went. I created the images before I wrote these word for the blog. Created them before I had the idea that probability distributions might be a way to explore the order / chaos boundary.

The answer is still "a cool 2d probability distribution", but I found it somewhere else. And of course that leads to another lengthy, multiple post digression.

50000 Rectangles #20

100000 rectangles

(Continued from 50000 Rectangles #19.) I use some ideas from Iterated Function Systems. The most famous IFS is probably the Sierpiński Gasket. IFS images can be generated by playing the Chaos Game. I use the Chaos Game to generate a 2d probability distribution.

I do not want to dig too deep into the technicalities. I will tread there lightly. I do not know why I bother. This is still too deep for the casual reader and too shallow for someone familiar with the topic. But I try anyway.

An iterated function system is a set of functions on some reasonable mathematical space. The functions are expected to be Contraction Mappings, which means that they make things shrink. We are interested in the "fixed set" of these functions.

The Chaos Game as described in the Wikipedia article is about tracking a point as it moves closer to a randomly selected vertex of a fixed polygon. For the Sierpiński Gasket the polygon is a triangle and each move is one half the distance to the vertex. The move-toward-a-vertex action is an Affine function and a Contraction Mapping.

50000 Rectangles #21

50000 rectangles

(Continued from 50000 Rectangles #20.) Chaos Game as defined in the wiki uses a specific type of function (move towards vertex). This is an unnecessary restriction. Iterated Function Systems has the looser requirement of Contraction Mappings. Contraction mappings can be nonlinear.

It turns out that playing the chaos game on and IFS collection of functions will reveal the fixed set for that IFS. Even though nonlinear functions are allowed, the wiki page for IFS shows only linear/affine examples. Flame Fractals are examples of IFS that include non-linear generating functions.

50000 Rectangles #22

50000 rectangles

(Continued from 50000 Rectangles #21.) IFS and Flame Fractals are fascinating, but they have also been done to death. I may try my hand at them someday. But for now, I just want to extract a small observation. The result of the chaos game is a random distribution. In our situation, a 2D random distribution. But one that is unlike any studied in statistics. I set up the chaos game on a set of functions, linear and nonlinear. Then use the points generated as the lower left corners of the rectangles.

The reason IFS uses contraction mapping is to ensure that the fixed set exists and is bounded. Without that restriction there may be no fixed set. The moving point in the chaos game may run off to infinity. But when using math for art, we are not so worried about such things. I mix in functions that are not contraction mappings. If they do not work, I just try something else.

50000 Rectangles #23

40000 rectangles.

(Continued from 50000 Rectangles #22.) A typical IFS fractal requires many iterations of the chaos game. Each chaos-game point is used to build a histogram. There are as many buckets in the histogram as pixels in the image. More if there is oversampling. If color is used to represent density, many buckets need to be hit many times. One hundred million iterations or more may be necessary for a high resolution color IFS image.

These images do not require as many iterations as a typical IFS or flame fractal. Each point generates a rectangle, so the screen fills quickly. Ten thousand iterations is usually adequate.

50000 Rectangles #24

200000 rectangles.

(Continued from 50000 Rectangles #23.) I do not spend a lot of time selecting the functions for the IFS system. I just grab a random set and see how it works. If I do not like it, I try something else.

Some of these IFS function sets work well alone. Some sets are too random or too simple to stand alone. I select a few different IFS sets and superimpose them. Now, the image has an interesting conflict between the too simple and too complex. A typical 50000 rectangle image may have 5000 iterations of each of ten different sets, or five sets of 10000.

There are some loose guidelines I follow when merging different IFS function sets. In general, more functions in an IFS set means more randomness, more messiness. Larger coefficients also generally means more mixing, and more mess. So, depending on the effect I am trying to achieve at the time, I keep these variables within narrow limits.

Today's Special
In today's picture, there is only one function in each IFS function set. With only one function there is no randomness in the function selection. It is just iteration of a single function. The function is constrained (so that is does not escape to infinity), but not contracting (so it does not collapse to a single point). Five different single-function iterations are overlaid.

50000 Rectangles #25

60000 rectangles.

(Continued from 50000 Rectangles #24.) The short version: the rectangles are placed randomly using strange, fractal like, random distributions.

That just tells us the corner of the rectangle. The rectangle also has width, height, color, and orientation.

If these values are constant, then the image is too tame. If these values are chosen randomly for each rectangle, the image is too random.

50000 Rectangles #26

450 rectangles.

Today
Before now, each rectangle had uniform weight (as defined in 50000 Rectangles #2). Here the rectangle has more weight near the center and less at the edges. Weight affect color overlay and shadows. Also, obviously, there are far fewer than 50000 rectangles today.

Ongoing Story
(Continued from 50000 Rectangles #25.) As described before, the rectangle locations are in N sets of M rectangles. N is small, M is large. N=10, M=5000 for example.

A color is selected for each set. The color is constant within a set, different from set to set. Recall that the locations for each set are determined by different IFS-like function sets. Each set follows a different random distribution. This helps bring out the different characteristics of the different distributions.

50000 Rectangles #27

1800 rectangles.

(Continued from 50000 Rectangles #26.) All rectangles within an image have the same length. That length changes from image to image, but within an image it is constant.

The rectangle width decreases for each set. The first set has thicker rectangles than the later ones. This helps to compensate for the new rectangles going on top of the earlier ones.

I do one of two things with the rectangle orientation. The first option is to use the same orientation for all the rectangles within a set.

Today
Today's picture has 18 sets of 1000 rectangles. Each of three colors are repeated over six sets. The narrowest rectangle is 80% of the width of the widest. The size change is very subtle here. Six different orientations are present, each repeated three time. It looks like only three orientations. There are three pairs offset by 180 degrees. It is hard to tell a rectangle that points to the right from one that points to the left.

50000 Rectangles #28

60 rectangles.

(Continued from 50000 Rectangles #27.) The second option for orientation is to use the phase of the rectangle's corner. The phase of a complex number is the angle (in radians) of the ray from the origin to the complex number. See Complex Number. If the orientation is set to the phase, then every rectangle points away from the center.

Today's image uses the orientation-by-set rule described yesterday. 50000 Rectangles #11 is an example of the basic phase rule.

50000 Rectangles #29

1000 rectangles.

Today
The weight within a rectangle varies by another random/not random distribution. The result is as if the paint is applied using a sponge.

Ongoing Story
(Continued from 50000 Rectangles #28.) Using the phase for the rectangle orientation is fun the first few times, but gets old quick. However there are enough simple tricks to keep it interesting. Sometimes I move the origin, then the rectangles seem to emanate from a different point. If pi/2 (90 degrees) is added to the phase then the rectangles fit into circles around the origin. Other offsets have different effects, creating spirals for example.

If the orientation is doubled then the rectangles seem to point away from the center on one side and into the center on the other. Similar to field lines around a magnetic pole. Combing different multiples and offsets create enough variations to keep me entertained for the whole series.

50000 Rectangles #14, 50000 Rectangles #18, 50000 Rectangles #25 and many others are examples of variations on the phase rule.

50000 Rectangles #30

100000 rectangles.

Today
A lot of very thin rectangles. Lines really. Each color set is following a different IFS rule set.

Ongoing Story
(Continued from 50000 Rectangles #29.) Rules have exceptions. All of the color, length, width, orientation rules just described are broken on occasion.

50000 Rectangles #31

1600000 rectangles.

50000 Rectangles #32

160000 rectangles.

Each IFS set today consists of a single function. So no randomness, the image is fully deterministic.

50000 Rectangles #33

160000 rectangles.

Same idea as yesterday. Tamer color palette.

← Previous 20 Showing 19-33 of 33 Next 20 →