The Swing’s the Thing

Order emerges from chaos with a triangle or pentagon, but not with a square. That is, if you take a triangle or a pentagon, chose a point inside it, then move the point repeatedly halfway towards a vertex chosen at random, a fractal will appear:

triangle

Sierpiński triangle from point jumping halfway to randomly chosen vertex


pentagon

Sierpiński pentagon from point jumping halfway to randomly chosen vertex


But it doesn’t work with a square. Instead, the interior of the square slowly fills with random points:

square

Square filling with point jumping halfway to randomly chosen vertex


As I showed in Polymorphous Perverticity, you can create fractals from squares and randomly moving points if you ban the point from choosing the same vertex twice in a row, and so on. But there are other ways. You can take the point, move it towards a vertex at random, then swing it around the center of the square through some angle before you mark its position, like this:

square_sw90

Point moves at random, then swings by 90° around center


square_sw180

Point moves at random, then swings by 180° around center


You can also adjust the distance of the point from the center of the square using a formula like dist = r * rmdist, where dist is the distance, r is the radius of the circle in which the circle is drawn, and rm takes values like 0.1, 0.25, 0.5, 0.75 and so on:

square_dist_rm0_05

Point moves at random, dist = r * 0.05 – dist


square_dist_rm0_1

Point moves at random, dist = r * 0.1 – dist


square_dist_rm0_2

Point moves at random, dist = r * 0.2 – dist


But you can swing the point while applying a vertex-ban, like banning the previously chosen vertex, or the vertex 90° or 180° away. In fact, swinging the points converts one kind of vertex ban into the others.

square_ban0

Point moves at random towards vertex not chosen previously


square_ban0_sw405

Point moves at random, then swings by 45°


square_ban0_sw360

Point moves at random, then swings by 360°


square_ban0_sw697

Point moves at random, then swings by 697.5°


square_ban0_sw720

Point moves at random, then swings by 720°


square_ban0_sw652

Point moves at random, then swings by 652.5°


square_ban0_swing_va_animated

Animated angle swing


You can also reverse the swing at every second move, swing the point around a vertex instead of the center or around a point on the circle that encloses the square. Here are some of the fractals you get applying these techniques.
square_ban0_sw45_rock

Point moves at random, then swings alternately by 45°, -45°


square_ban0_sw90_rock

Point moves at random, then swings alternately by 90°, -90°


square_ban0_sw135_rock

Point moves at random, then swings alternately by 135°, -135°


square_ban0_sw180_rock

Point moves at random, then swings alternately by 180°, -180°


square_ban0_sw225

Point moves at random, then swings alternately by 225°, -225°


square_ban0_sw315

Point moves at random, then swings alternately by 315°, -315°


square_ban0_sw360_rock

Point moves at random, then swings alternately by 360°, -360°


square_swing_vx0_va_animated

Animated alternate swing


square_circle_sw45

Point moves at random, then swings around point on circle by 45°


square_circle_sw67

Point moves at random, then swings around point on circle by 67.5°


square_circle_sw90

Point moves at random, then swings around point on circle by 90°


square_circle_sw112

Point moves at random, then swings around point on circle by 112.5°


square_circle_sw135

Point moves at random, then swings around point on circle by 135°


square_circle_sw180

Point moves at random, then swings around point on circle by 180°


square_circle_sw_animated

Animated circle swing


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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.