Randomness Followup

Starting with four vertices.

In yesterday’s post a fractal was made by repeatedly moving a point halfway to a randomly selected vertex of a triangle, and I noted that the same magic does not happen with four vertices.  How young and foolish I was then!

Playing with the code a bit, I found that you may instead

1. Start with a point x inside a regular n-gon.

2. Choose a random vertex v.

3. Move your point to the point (x+(n-2)v)/(n-1)).

4. Repeat.

Notice that if n was 3, we get the recipe for the Sierpinski triangle (aka carpet, aka gasket) from yesterday.  Also, if n is 2, then you get a single point (which, ok, is a fractal in that it is self similar, but sort of sucks).  I haven’t checked, but it looks like the Hausdorff dimension of the fractal produced starting with n vertices is something like ln(n)/ln(n-1).  More on calculating that later.

Anyways, here is the MATLAB code for creating these fractals, and pictures of a few of them.

function gasketn(rad,n,d,sides)
%creates a fractal with radius rad, n points, each point of size d, and
%"sides" sides. gasketn(1,100000,1,3) creates a Sierpinski gasket.
t = linspace(0,2*pi,sides+1);
x = [rad*cos(t),rad];
y = [rad*sin(t),0];
point = zeros(n,2);
vert = randi(sides,n,1);

for j = 2:n
point(j,:) = point(j-1,:)/(sides-1) + (sides-2)*[x(vert(j)),y(vert(j))]/(sides-1);
axis off

Starting with five vertices.


Six vertices!


Twelve vertices! And now this is getting silly...


2 comments on “Randomness Followup

  1. lkovalev says:

    However, these fractals are dust-like, while the Sierpinski gasket is connected. Apart from n=4, you don’t have to scale down by that much to get a nice fractals. See the paper “Quasiconformal dimensions of self-similar fractals” (Tyson and Wu): page 207 has the images for several n, and page 240 describes the construction in formulas. They scale down just enough to keep the thing barely connected.
    The case n=4 indeed gives a solid square, which is boring. Tyson and Wu studied the dimension of quasiconformal images of such gaskets; specifically the prove that inf{dim f(E) : f quasiconformal} is equal to 1 when n is not divisible by 4. This infimum (called quasiconformal dimension) is 2 for the square, as it is for any planar set with positive area. For the remaining values n=8,12,16,… they had no answer, at least when the paper was written.

    Link: http://projecteuclid.org/DPubS?service=UI&version=1.0&verb=Display&handle=euclid.rmi/1148492181

  2. […] after yesterday’s post (which was a response to the post of two days ago), I found a few more cool things with this method […]

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s