Dime Time

Everyone knows the shapes for one and two dimensions, far fewer know the shapes for three and four dimensions, let alone five, six and seven. And what shapes are those? The shapes that answer this question:

• How many equidistant points are possible in 1d, 2d, 3d, 4d…?

In one dimension it’s obvious that the answer is 2. In other words, you can get only two equidistant points, (a,b), on a straight line. Point a must be as far from point b as point b is from point a. You can’t add a third point, c, such that (a,b,c) are equidistant. Not on a straight line in 1d. But suppose you bend the line into a circle, so that you’re working in two dimensions. It’s easy to place three equidistant points, (a,b,c), on a circle.

equidistant points on a circle

Three equidistant points around a circle forming the vertices of an equilateral triangle


And it’s also easy to see that the three points will form the vertices of an equilateral triangle. Now try adding a fourth point, d. If you place it in the center of the triangle, it will be equidistant from (a,b,c), but it will be nearer to (a,b,c) than they are to each other. So you can have only 2 equidistant points in 1d and 3 equidistant points in 2d.

But what are the co-ordinates of the equidistant points in 1d and 2d? Suppose (a,b) in 1d are given the co-ordinates (0) and (1), so that a is 1 unit distant from b. When you move to 2d and add point c, the co-ordinates for (a,b) become (0,0) and (1,0). They’re still 1 unit distant from each other. But what are the co-ordinates for c? Start by placing c exactly midway between a and b, so that it has the co-ordinates (0.5,0) and is 0.5 units distant from both a and b. Now, if you move c in the first dimension, it will become nearer either to a or b: (0.49,0) or (0.51,0) or (0.48,0) or (0.52,0)…

But if you move c in the second dimension, it will always be equidistant from a and b, because (a,b) stay in the first dimension, as it were, and c moves equally away from both into the second dimension. So where in 2d will c be 1 unit distant from both a and b just as a and b are 1 unit distant from each other in 1d? You can see the answer here:

equilateral_triangle heightHeight of an equilateral triangle


The co-ordinates for c are (0.5,√3/2) or (0.5,0.8660254…), because the second co-ordinate satisfies the Pythagorean equation 1^2 = 0.5^2 + (√3/2)^2 = 0.25 + 0.75. That is, to find the second co-ordinate of c for 2d, you find the answer to √(1 – 0.5^2) = √(1-0.25) = √0.75 = √(3/4) = √3/2 = 0.8660254….

But you can’t add a fourth point, d, in 2d such that (a,b,c,d) are equidistant. So let’s move to 3d for the points (a,b,c,d). Begin with point d in the center of the triangle formed by (a,b,c), where it will have the co-ordinates (0.5,√3/6,0) = (0.5,0.28867513…,0) and will be equidistant from (a,b,c). But d will be nearer to (a,b,c) than they are to each other. However, if you move d in the third dimension, it will be moving equally away from (a,b,c). So where in 3d will d be 1 unit from (a,b,c)? By analogy with 2d, the third co-ordinate for d will satisfy the generalized Pythagorean equation √(1 – 0.5^2 – (√3/6)^2). And √6/3 = √(1 – 0.5^2 – (√3/6)^2) = 0.81649658… So point d will have the co-ordinates (0.5,√3/6,√6/3) = (0.5, 0.288675135…, 0.816496581…).

And the four points (a,b,c,d) will be the vertices of a three-dimensional shape called the tetrahedron:

Rotating tetrahedron

Rotating tetrahedron


But you can’t add a fifth point, e, in 3d such that (a,b,c,d,e) are equidistant. So let’s move to 4d, the fourth dimension, for the points (a,b,c,d,e). Begin with point e in the center of the tetrahedron formed by (a,b,c,d), where it will have the co-ordinates (0.5,√3/6,√6/12,0) = (0.5,0.28867513…, 0.2041241…, 0) and will be equidistant from (a,b,c,d). But e will be nearer to (a,b,c,d) than they are to each other. However, if you move e in the fourth dimension, it will be moving equally away from (a,b,c,e). So where in 4d will e be 1 unit from (a,b,c,d)? By analogy with 2d and 3d, the co-ordinate for 4d will satisfy the equation √(1 – 0.5^2 – (√3/6)^2 – (√6/12)^2). And √10/4 = √(1 – 0.5^2 – (√3/6)^2 – (√6/12)^2) = 0.79056941… So point e will have the co-ordinates (0.5,√3/6,√6/3,√10/4) = (0.5, 0.288675135…, 0.816496581…, 0.79056941…).

And the five points (a,b,c,d,e) will be the vertices of a four-dimensional shape called variously the hyperpyramid, the 5-cell, the pentachoron, the 4-simplex, the pentatope, the pentahedroid and the tetrahedral pyramid. It’s impossible for 3d creatures like human beings (at present) to visualize the hyperpyramid, but we can see its 3d shadow, as it were. And here is the 3d shadow of a rotating hyperpyramid:

Rotating hyperpyramid or 5-cell

Rotating hyperpyramid


N.B. Wikipedia reveals the mathematically beautiful fact that the “simplest set of coordinates [for a hyperpyramid] is: (2,0,0,0), (0,2,0,0), (0,0,2,0), (0,0,0,2), (φ,φ,φ,φ), with edge length 2√2, where φ is the golden ratio.”

So that’s the hyperpyramid, with 5 points in 4d. But you can’t add a sixth point, f, in 4d such that (a,b,c,d,e,f) are equidistant. You have to move to 5d. And it should be clear by now that in any dimension nd, the maximum possible number of equidistant points, p, in that dimension will be p = n+1. And here are the co-ordinates for p in dimensions 1 to 10 (the co-ordinates are given in full for 1d to 4d, then for 5d to 10d only the co-ordinates of the additional point are given):

d1: (0), (1)
d2: (0,0), (1,0), (0.5,0.866025404)
d3: (0,0,0), (1,0,0), (0.5,0.866025404,0), (0.5,0.288675135,0.816496581)
d4: 0.5, 0.288675135, 0.204124145, 0.790569415
d5: 0.5, 0.288675135, 0.204124145, 0.158113883, 0.774596669
d6: 0.5, 0.288675135, 0.204124145, 0.158113883, 0.129099445, 0.763762616
d7: 0.5, 0.288675135, 0.204124145, 0.158113883, 0.129099445, 0.109108945, 0.755928946
d8: 0.5, 0.288675135, 0.204124145, 0.158113883, 0.129099445, 0.109108945, 0.0944911183, 0.75
d9: 0.5, 0.288675135, 0.204124145, 0.158113883, 0.129099445, 0.109108945, 0.0944911183, 0.0833333333, 0.745355992
d10: 0.5, 0.288675135, 0.204124145, 0.158113883, 0.129099445, 0.109108945, 0.0944911183, 0.0833333333, 0.0745355992, 0.741619849

In each dimension d, the final co-ordinate, cd+1, of the additional point satisfies the generalized Pythagorean equation cd+1 = √(1 – c1^2 – c2^2 – … cd^2).


Readers’ advisory: I am not a mathematician and the discussion above cannot be trusted to be free of errors, whether major or minor.

Hex Appeal

A polyiamond is a shape consisting of equilateral triangles joined edge-to-edge. There is one moniamond, consisting of one equilateral triangle, and one diamond, consisting of two. After that, there are one triamond, three tetriamonds, four pentiamonds and twelve hexiamonds. The most famous hexiamond is known as the sphinx, because it’s reminiscent of the Great Sphinx of Giza:

sphinx_hexiamond

It’s famous because it is the only known pentagonal rep-tile, or shape that can be divided completely into smaller copies of itself. You can divide a sphinx into either four copies of itself or nine copies, like this (please open images in a new window if they fail to animate):

sphinx4

sphinx9

So far, no other pentagonal rep-tile has been discovered. Unless you count this double-triangle as a pentagon:

double_triangle_rep-tile

It has five sides, five vertices and is divisible into sixteen copies of itself. But one of the vertices sits on one of the sides, so it’s not a normal pentagon. Some might argue that this vertex divides the side into two, making the shape a hexagon. I would appeal to these ancient definitions: a point is “that which has no part” and a line is “a length without breadth” (see Neuclid on the Block). The vertex is a partless point on the breadthless line of the side, which isn’t altered by it.

But, unlike the sphinx, the double-triangle has two internal areas, not one. It can be completely drawn with five continuous lines uniting five unique points, but it definitely isn’t a normal pentagon. Even less normal are two more rep-tiles that can be drawn with five continuous lines uniting five unique points: the fish that can be created from three equilateral triangles and the fish that can be created from four isosceles right triangles:

equilateral_triangle_fish_rep-tile

right_triangle_fish_rep-tile

Rep It Up

When I started to look at rep-tiles, or shapes that can be divided completely into smaller copies of themselves, I wanted to find some of my own. It turns out that it’s easy to automate a search for the simpler kinds, like those based on equilateral triangles and right triangles.

right triangle rep-tiles

right_triangle_fish

equilateral_triangle_reptiles

equilateral_triangle_rocket

(Please open the following images in a new window if they fail to animate)

duodeciamond

triangle mosaic


Previously pre-posted (please peruse):

Rep-Tile Reflections

Hextra Texture

A hexagon can be divided into six equilateral triangles. An equilateral triangle can be divided into a hexagon and three more equilateral triangles. These simple rules, applied again and again, can be used to create fractals, or shapes that echo themselves on smaller and smaller scales.

hextriangle

hextriangle2

hextriangle1


Previously pre-posted (please peruse):

Fractal Fourmulas

Tri Again

All roads lead to Rome, so the old saying goes. But you may get your feet wet, so try the Sierpiński triangle instead. This fractal is named after the Polish mathematician Wacław Sierpiński (1882-1969) and quite a few roads lead there too. You can create it by deleting, jumping or bending, inter alia. Here is method #1:

Sierpinski middle delete

Divide an equilateral triangle into four, remove the central triangle, do the same to the new triangles.

Here is method #2:

Sierpinski random jump

Pick a corner at random, jump half-way towards it, mark the spot, repeat.

And here is method #3:

Sierpinski arrowhead

Bend a straight line into a hump consisting of three straight lines, then repeat with each new line.

Each method can be varied to create new fractals. Method #3, which is also known as the arrowhead fractal, depends on the orientation of the additional humps, as you can see from the animated gif above. There are eight, or 2 x 2 x 2, ways of varying these three orientations, so eight fractals can be produced if the same combination of orientations is kept at each stage, like this (some are mirror images — if an animated gif doesn’t work, please open it in a new window):

arrowhead1

arrowhead2

arrowhead3

arrowhead4

arrowhead5

If different combinations are allowed at different stages, the number of different fractals gets much bigger:

• Continuing viewing Tri Again.

V for Vertex

To create a simple fractal, take an equilateral triangle and divide it into four more equilateral triangles. Remove the middle triangle. Repeat the process with each new triangle and go on repeating it. You’ll end up with a shape like this, which is known as the Sierpiński triangle, after the Polish mathematician Wacław Sierpiński (1882-1969):

Sierpinski triangle

But you can also create the Sierpiński triangle one pixel at a time. Choose any point inside an equilateral triangle. Pick a corner of the triangle at random and move half-way towards it. Mark this spot. Then pick a corner at random again and move half-way towards the corner. And repeat. The result looks like this:

triangle

A simple program to create the fractal looks like this:

initial()
repeat
  fractal()
  altervariables()
until false

function initial()
  v = 3 [v for vertex]
  r = 500
  lm = 0.5
endfunc

function fractal()
  th = 2 * pi / v
[the following loop creates the corners of the triangle]
  for l = 1 to v
    x[l]=xcenter + sin(l*th) * r
    y[l]=ycenter + cos(l*th) * r
  next l
  fx = xcenter
  fy = ycenter
  repeat
    rv = random(v)
    fx = fx + (x[rv]-fx) * lm
    fy = fy + (y[rv]-fy) * lm
    plot(fx,fy)
  until keypressed
endfunc

function altervariables()
[change v, lm, r etc]
endfunc

In this case, more is less. When v = 4 and the shape is a square, there is no fractal and plot(fx,fy) covers the entire square.

square

When v = 5 and the shape is a pentagon, this fractal appears:

pentagon

But v = 4 produces a fractal if a simple change is made in the program. This time, a corner cannot be chosen twice in a row:

square_used1

function initial()
  v = 4
  r = 500
  lm = 0.5
  ci = 1 [i.e, number of iterations since corner previously chosen]
endfunc

function fractal()
  th = 2 * pi / v
  for l = 1 to v
    x[l]=xcenter + sin(l*th) * r
    y[l]=ycenter + cos(l*th) * r
    chosen[l]=0
  next l
  fx = xcenter
  fy = ycenter
  repeat
    repeat
      rv = random(v)
    until chosen[rv]=0
    for l = 1 to v
      if chosen[l]>0 then chosen[l] = chosen[l]-1
    next l
    chosen[rv] = ci
    fx = fx + (x[rv]-fx) * lm
    fy = fy + (y[rv]-fy) * lm
    plot(fx,fy)
  until keypressed
endfunc

One can also disallow a corner if the corner next to it has been chosen previously, adjust the size of the movement towards the chosen corner, add a central point to the polygon, and so on. Here are more fractals created with such variations:

square_used1_center

square_used1_vi1

square_used1_vi2

square_used2

pentagon_lm0.6

pentagon_used1_5_vi1

hexagon_used1_6_vi3