Boole(b)an #3

In the posts “Boole(b)an #1″ and “Boole(b)an #2” I looked at fractals created by certain kinds of ban on a point jumping (quasi-)randomly towards the four vertices, v=1..4, of a square. For example, suppose the program has a vertex-history of 2, that is, it remembers two jumps into the past, the previous jump and the pre-previous jump. There are sixteen possible combinations of pre-previous and previous jumps: [1,1], [1,2], 1,3] … [4,2], [4,3], [4,4].

Let’s suppose the program bans 4 of those 16 combinations by reference to the current possible jump. For example, it might ban [0,0]; [0,1]; [0,3]; [2,0]. To see what that means, let’s suppose the program has to decide at some point whether or not to jump towards v=3. It will check whether the combination of pre-previous and previous jumps was [3+0,3+0] = [3,3] or [3+0,3+1] = [3,4] or [3+0,3+3] = [3,2] or [3+2,3+0] = [1,3] (when the sum > 4, v = sum-4). If the previous combination is one of those pairs, it bans the jump towards v=3 and chooses another vertex; otherwise, it jumps towards v=3 and updates the vertex-history. This is the fractal that appears when those bans are used:

ban = [0,0]; [0,1]; [0,3]; [2,0]


And here are more fractals using a vertex-history of 2 and a ban on 4 of 16 possible combinations of pre-previous and previous jump:

ban = [0,0]; [0,1]; [0,3]; [2,2]


ban = [0,0]; [0,2]; [1,0]; [3,0]


ban = [0,0]; [0,2]; [1,1]; [3,3]


ban = [0,0]; [0,2]; [1,3]; [3,1]


ban = [0,0]; [1,0]; [2,2]; [3,0]


ban = [0,0]; [1,1]; [1,2]; [3,2]

Continue reading “Boole(b)an #3”…


Elsewhere other-engageable

Boole(b)an #1
Boole(b)an #2

This Charming Dis-Arming

One of the charms of living in an old town or city is finding new routes to familiar places. It’s also one of the charms of maths. Suppose a three-armed star sprouts three half-sized arms from the end of each of its three arms. And then sprouts three quarter-sized arms from the end of each of its nine new arms. And so on. This is what happens:

Three-armed star


3-Star sprouts more arms


Sprouting 3-Star #3


Sprouting 3-Star #4


Sprouting 3-Star #5


Sprouting 3-Star #6


Sprouting 3-Star #7


Sprouting 3-Star #8


Sprouting 3-Star #9


Sprouting 3-Star #10


Sprouting 3-Star #11 — the Sierpiński triangle


Sprouting 3-star (animated)


The final stage is a famous fractal called the Sierpiński triangle — the sprouting 3-star is a new route to a familiar place. But what happens when you trying sprouting a four-armed star in the same way? This does:

Four-armed star #1


Sprouting 4-Star #2


Sprouting 4-Star #3


Sprouting 4-Star #4


Sprouting 4-Star #5


Sprouting 4-Star #6


Sprouting 4-Star #7


Sprouting 4-Star #8


Sprouting 4-Star #9


Sprouting 4-Star #10


Sprouting 4-star (animated)


There’s no obvious fractal with a sprouting 4-star. Not unless you dis-arm the 4-star in some way. For example, you can ban any new arm sprouting in the same direction as the previous arm:

Dis-armed 4-star (+0) #1


Dis-armed 4-Star (+0) #2


Dis-armed 4-Star (+0) #3


Dis-armed 4-Star (+0) #4


Dis-armed 4-Star (+0) #5


Dis-armed 4-Star (+0) #6


Dis-armed 4-Star (+0) #7


Dis-armed 4-Star (+0) #8


Dis-armed 4-Star (+0) #9


Dis-armed 4-Star (+0) #10


Dis-armed 4-star (+0) (animated)


Once again, it’s a new route to a familiar place (for keyly committed core components of the Overlord-of-the-Über-Feral community, anyway). Now try banning an arm sprouting one place clockwise of the previous arm:

Dis-armed 4-Star (+1) #1


Dis-armed 4-Star (+1) #2


Dis-armed 4-Star (+1) #3


Dis-armed 4-Star (+1) #4


Dis-armed 4-Star (+1) #5


Dis-armed 4-Star (+1) #6


Dis-armed 4-Star (+1) #7


Dis-armed 4-Star (+1) #8


Dis-armed 4-Star (+1) #9


Dis-armed 4-Star (+1) #10


Dis-armed 4-Star (+1) (animated)


Again it’s a new route to a familiar place. Now trying banning an arm sprouting two places clockwise (or anti-clockwise) of the previous arm:

Dis-armed 4-Star (+2) #1


Dis-armed 4-Star (+2) #2


Dis-armed 4-Star (+2) #3


Dis-armed 4-Star (+2) #4


Dis-armed 4-Star (+2) #5


Dis-armed 4-Star (+2) #6


Dis-armed 4-Star (+2) #7


Dis-armed 4-Star (+2) #8


Dis-armed 4-Star (+2) #9


Dis-armed 4-Star (+2) #10


Dis-armed 4-Star (+2) (animated)


Once again it’s a new route to a familiar place. And what happens if you ban an arm sprouting three places clockwise (or one place anti-clockwise) of the previous arm? You get a mirror image of the Dis-armed 4-Star (+1):

Dis-armed 4-Star (+3)


Here’s the Dis-armed 4-Star (+1) for comparison:

Dis-armed 4-Star (+1)


Elsewhere other-accessible

Boole(b)an #2 — other routes to the fractals seen above

Boole(b)an #2

In “Boole(b)an”, I looked at some of the things that happen when you impose bans of different kinds on a point jumping half-way towards a randomly chosen vertex of a square. If the point can’t jump towards the same vertex twice (or more) in a row, you get the fractal below (or rather, you get a messier version of the fractal below, because I’ve used an algorithm that finds all possible routes to create the fractals in this post):

ban = v(i) + 0


If the point can’t jump towards the vertex one place clockwise of the point it has just jumped towards, you get this fractal:

ban = v(i) + 1


If the point can’t jump towards the vertex two places clockwise (or anti-clockwise) of the point it has just jumped towards, you get this fractal:

ban = v(i) + 2


Finally, you get a mirror-image of the one-place-clockwise fractal when the ban is on jumping towards the vertex three places clockwise (or one place anti-clockwise) of the previous vertex:

ban = v(i) + 3


Now let’s introduce the concept of “vertex-history”. The four fractals above use a vertex-history of 1, vh = 1, because they look one step into the past, at the previously chosen vertex. Because there are four vertices, there are four possible previous vertices. But when vh = 2, you’re taking account of both the previous vertex, v(i), and what you might call the pre-previous vertex, v(i-1). There are sixteen possible combinations of previous vertex and pre-previous vertex (16 = 4 x 4).

Now, suppose the jump-ban is imposed when one of two conditions is met: the vertex is 1) one place clockwise of the previous vertex and the same as the pre-previous vertex; 2) three places clockwise of the previous chosen vertex and the same as the pre-previous vertex. So the boolean test is (condition(1) AND condition(2)) OR (condition(3) AND condition(4)). When you apply the test, you get this fractal:

ban = v(i,i-1) + [0,1] or v(i,i-1) + [0,3]


The fractal looks more complex, but I think it’s a blend of some combination of the four classic fractals shown at the beginning of this post. Here are more multiple-ban fractals using vh = 2 and bani = 2:

ban = [0,1] or [1,1]


ban = [0,2] or [2,0]


ban = [0,2] or [2,2]


ban = [1,0] or [3,0]


ban = [1,1] or [3,3]


ban = [1,2] or [2,2]


ban = [1,2] or [3,2]


ban = [1,3] or [2,0]


ban = [1,3] or [3,1]


ban = [2,0] or [2,2]


ban = [2,1] or [2,3]


For the fractals below, vh = 2 and bani = 3 (i.e., bans are imposed when one of three possible conditions is met). Again, I think the fractals are blends of some combination of the four classic ban-fractals shown at the beginning of this post:

ban = [0,0] or [1,2] or [3,2]


ban = [0,0] or [1,3] or [3,1]


ban = [0,0] or [2,1] or [2,3]


ban = [0,1] or [0,2] or [0,3]


ban = [0,1] or [0,3] or [1,1]


ban = [0,1] or [0,3] or [2,0]


ban = [0,1] or [0,3] or [2,2]


ban = [0,1] or [1,1] or [1,2]


ban = [0,1] or [1,1] or [3,0]


ban = [0,1] or [1,2] or [3,2]


ban = [0,2] or [1,0] or [3,0]


ban = [0,2] or [1,1] or [3,3]


ban = [0,2] or [1,2] or [2,2]


ban = [0,2] or [1,2] or [3,1]


ban = [0,2] or [1,2] or [3,2]


ban = [0,2] or [1,3] or [2,0]


ban = [0,2] or [1,3] or [3,1]


ban = [0,2] or [2,0] or [2,2]


ban = [0,2] or [2,1] or [2,3]


ban = [0,2] or [2,2] or [3,2]


ban = [0,3] or [1,0] or [2,0]


ban = [1,0] or [1,2] or [3,0]


ban = [1,0] or [2,2] or [3,0]


ban = [1,1] or [2,0] or [3,3]


ban = [1,1] or [2,1] or [3,1]


ban = [1,1] or [2,2] or [3,3]


ban = [1,1] or [2,3] or [3,3]


ban = [1,2] or [2,0] or [3,1]


ban = [1,2] or [2,0] or [3,2]


ban = [1,2] or [2,1] or [2,3]


ban = [1,2] or [2,3] or [3,2]


ban = [1,2] or [3,2] or [3,3]


ban = [1,3] or [2,0] or [2,2]


ban = [1,3] or [2,0] or [3,0]


ban = [1,3] or [2,0] or [3,1]


ban = [1,3] or [2,2] or [3,1]


ban = [2,0] or [3,1] or [3,2]


ban = [2,1] or [2,3] or [3,2]


Previously pre-posted

Boole(b)an — an early look at ban-fractals

Corralling Chaos

“Down through the aether I saw the accursed earth turning, ever turning, with angry and tempestuous seas gnawing at wild desolate shores and dashing foam against the tottering towers of deserted cities.” — “The Crawling Chaos” (1921), Winifred Jackson and H. P. Lovecraft.


All the best people brood incessantly on the fact that a point inside a square jumping half-way towards a randomly chosen vertex will not create a fractal. Inside a triangle, yes: a fractal appears. Inside a pentagon too. But not inside a square:

Point jumping half-way towards a randomly chosen vertex


Instead, the interior of the square fills with random points: it crawls with chaos, you might say. However, fractals appear inside a square if the point is restricted in some way: banned from jumping towards a vertex twice in a row; banned from jumping towards the second-nearest vertex; and so on. Those restrictions are what might be called soft, because they take place in software (or in the brain of someone following the rule as a game or piece of performance art). Here’s what might be called a hard restriction that creates a fractal: the point cannot jump towards a randomly vertex if its jump passes over any part of the red upright cross:

Point cannot pass over red lines


I call this a barrier fractal. It’s obvious that the point cannot jump from one corner of the square towards the opposite corner, which creates bare space stretching from each vertex towards the tips of the upright cross. Less obvious is the way in which this bare space “cascades” into other parts of the square, creating a repeatedly branching and shrinking pattern.



When the barrier is a circle, a similar fractal appears:


If the point can also jump towards the center of the circle, this is what happens:


Now here’s an upright cross with a gap in the middle:


Here’s an upright cross when the point can also jump towards the center of the cross:


A slanted cross with a central attractor:


And a single horizontal stroke:


A slanted stroke — note pentagons:


Even if the barrier is small and set on an edge of the square, it affects the rest of the square:


A more attractive example of edge-affects-whole:


Circles away from the edges


Detail of previous image






Here the point can also jump towards the center of the square’s edges:


A more subtle barrier fractal uses the previous jumps of the point to restrict its next jump. For example, if the point cannot jump across the line created by its previous-but-one jump, it moves like this:

Jump can’t cross track of last-but-one jump (animated gif)


The fractal itself looks like this:


Rule: on jump #3, cannot jump across the line created by jump #1; on jump #4, cannot cross the line created by jump #2; and so on.



And this is the fractal if the point cannot jump across the line created by its previous-but-two jump:

Rule: on jump #4, cannot jump across the line created by jump #2; on jump #5, cannot cross the line created by jump #3; and so on



Appointment with Distality

distal, adj. Anat. Situated away from the centre of the body, or from the point of origin (said of the extremity or distant part of a limb or organ); terminal. Opp. to proximal. [← stem of dist- (in distant adj.) + -al, after dorsal, ventral, etc.] — Oxford English Dictionary

When a point jumps inside a triangle, moving halfway towards a randomly chosen vertex each time, a fractal known as the Sierpiński triangle appears:
chaos_triangle

Point jumping halfway towards random vertex of a triangle


chaos_triangle_bw

Point jumping inside triangle (black-and-white version)


But when a point moves at random in the same way inside a square, no fractal appears. Instead, the interior of the square gradually fills with a haze of pixels:
random_fill

Point jumping halfway towards random vertex of a square


Now trying imposing restrictions on the point jumping inside a square. If it can’t jump towards a vertex twice in a row, this fractal appears:
select_1_0

Ban consecutive jumps towards same vertex


select_1_0_bw

Ban consecutive jumps towards same vertex (black-and-white version)


Suppose the vertices are numbered from 1 to 4 and the point can’t jump towards the vertex one lower than the previously chosen vertex. That is, if it jumps towards vertex 3, it can’t jump next towards vertex 2, but it can jump towards vertices 1, 3, or 4 (if the vertex is 1, it’s banned from moving towards vertex 4, i.e. 1-1 = 0 = 4). Now this fractal appears:
select_1_1

Ban jump towards vertex v-1


select_1_1_bw


This is the fractal when the point can’t jump towards the vertex two places lower than the one it has just jumped towards:
select_1_2

Ban jump towards vertex v-2


select_1_2_bw


But if you can ban, you can also un-ban. Suppose the point jumps towards vertex v at time t and is then banned from jumping towards vertex v-2 at time t+1 unless it had jumped towards vertex v-1 at time t-1. This interesting fractal appears:
select_2_1_1_2

Ban jump v-2 at t+1 unless jump v-1 at t-1


Here are some more fractals using the ban / un-ban technique:
select_2_1_various

Ban / un-ban various


select_2_1_0_1

Ban jump v+0 at t+1 unless jump v+1 at t-1


select_2_1_1_3

Ban jump v+1 at t+1 unless jump v+3 at t-1


select_2_1_2_0

Ban jump v+0 at t+1 unless jump v+2 at t-1


select_2_1_2_2

Ban jump v+2 at t+1 unless jump v+2 at t-1


select_1_2_various

Ban / un-ban various


You can also impose or lift bans based not on the vertex the point jumps towards, but on the distance the point jumps. For example, take the radius r of the circle circumscribing the square and divide it into four segments, 0 to ¼r, ¼r to ½r, ½r to ¾r, and ¾r to r. When the point is going to jump towards vertex v, test whether its jump will land in the same segment, measured from the center of the circle, as it currently occupies. If it does, ban the jump and choose another vertex. Or unban the vertex if the point occupied segment s + x at time t-1. Here are some of the fractals produced using this technique:
dist_2_1_various

Ban / un-ban based on distance jumped


dist_center_1_0

Ban jump into segment s+0 of 4


dist_center_1_1

Ban jump into segment s+1 from center


dist_center_1_2

Ban jump into segment s+2


dist_center_-2_1_2_2

Ban jump into s+2 at t+1 unless jump into s+2 at at t-1


dist_xy_1_0

Ban jump into s+0 from present point


dist_xy_1_2

Ban jump into s+2 from present point


dist_xy_1_3

Ban jump into s+3 from present point


dist_xy_2_1_1_0

Ban jump into s+0 at t+1 unless jump into s+1 at at t-1


It’s easy to think of variants on all these themes, but I’ll leave them as an exercise for the interested reader.