Sunday, April 16, 2017

A Magical Easter Egg

This is a Very Serious Post. Really. It's a follow-up to my previous post about icosahedral tesselation of the sphere (Earth). The idea is to divide the Earth as best possible into equal equilateral triangles. It's an extension of the cubed sphere that I use for gridding in TempLS. The next step is to subdivide the 20 equilateral triangles from the icosahedron in triangles and project that onto the sphere. This creates some distortion near the vertices, but less than for the cube.

So I did it. But not having an immediate scientific use for it, and having some time at Easter, I started playing with some WebGL tricks. So here is the mesh (each triangle divided into 49) with some color features, including some spherical harmonics counterpoint.

Naturally, you can move it around, and there are some controls. Step is the amount of color change per step, speed is frame speed, and drift is the speed of evolution of the pattern. It's using a hacked version of the WebGL facility. Here it is. Happy Easter.

Update I have added some palette choices. The blue/white makes it easier to follow the spherical harmonics pattern.


  1. Ah but in the spirit of Fabrege what is the surprise inside. A great Easter to you Nick from an admirer

    1. Thanks, Eli, and best wishes to you and the warren. We practice transparency here, so if you checkbox Mesh off, and Mesh_L on, you can see. Transparent turtles all the way down.

      That was an interesting story about George V and 1935.

  2. Happy Easter 'a posteriori' to Nick and all the moyhu community!

    1. Thanks, Bindi,
      Traditionally, Easter is better a posteriori. Best wishes.

  3. Happy Easter - very nice.

    I think that the ideal tessellation of a sphere is probably hexagonal. Footballs are constructed that way for good reason!

    I am dreading learning WebGL ! But I fear I will have to dive in.


    1. Thanks, Clive,
      Good luck with WebGL. I described my early learning experience here. There is quite a lot of help on the Web; I linked there to Greggman, whose posts I found useful.

      The icosahedron is I think as near as you can get to hexagonal on the sphere. Something has to give, and having 12 points where the angle is 72° instead of 60 is the least pain, I think.