Computers beat the devil?

July 31, 2010

I am a little behind the times on this, but Dave Richeson recently posted a quote from Michael Atiyah:

Algebra is the offer made by the devil to the mathematician. The devil says: I will give you this powerful machine, it will answer any question you like. All you need to do is give me your soul: give up geometry and you will have this marvelous machine.

Sir Michael Atiyah, 2002

I like the quote, I have a geometry prejudice, and feel the need to understand everything through pictures. Yet I felt it left something out. Maybe there is a reverse of the classic duel between god and the devil:

Nature and Nature’s laws lay hid in night:
God said, “Let Newton be!” and all was light.

Alexander Pope: Epitaph intended for Sir Isaac Newton

It did not last; the devil howling
“Ho! Let Einstein be!” restored the status quo.

Sir John Collins Squire A Random Walk in Science compiled by R. L. Weber, edited by E. Mendoza

In this case it is God’s turn to subtly undermine the work of the devil, offering the gift of computers to mathematicians. Algebra becomes algorithm and the geometry be revealed once more. The question is still whether mathematicians (especially Atiyah himself!) will appreciate this new gift.


Spirographs and the third dimension

January 14, 2010

Toral Spirograph

The basic geometric ideas are straight lines and circles. The famous compass and straight edge.  There is a great deal that can be done with just these, but what if you want something more complex? Spirographs are a very simple idea, let one circle run around a second. You can make the circles as cogs and then you get a classic toy. In mathematics there is a mess of names to describe the curves produced, I shall just list them, understanding the differences is a good way of learning the subject: epicycloid, hypocycloid, epitrochoid, hypotrochoid. It is easy to find lots of examples of these curves online.

So where can we go to generalise. The first trick is to add more circles. Adding circles like this gave one of the first predictive models of the planets as they move in their strange paths across the sky.  Unfortunately if you add enough circles you can actually get any curve you want, so the method could never be disproved, though it was eventually replaced starting with the brilliance of Copernicus who put forward a model of the solar system with the sun at the center. To make images with more than two circle you obviously need a more complicated device as the circles might bump into each other (just think of three cogs). Luckily humanity was up to the challenge and produced the geometric chuck.

Three Circles 2d: (1,7) + (51,10) + (52,10)

Now we want to go further, to try to make similar figures in 3d. The first step is to get tools we can play with more easily than simply describing the geometry. We need a more algebraic form that we can give to the computer, and some way of simply describing the circles. The geometry comes first.  Here are the cogs:

The sizes of the two cogs show how fast they go round each other. In this case, we have a cog with 30 pegs and a cog with 10. The smaller cog will therefore go round 3 times every time it goes once round the big cog.  We now look at the red point on the smaller cog and watch it move along the green line.  How do we model this?

Firstly lets consider circles. We have the circles for the two cogs, but these are not very useful. We can look instead at the grey circle. The centre of the small cog moves round this circle. The black circle on the small cog then shows how the red dot moves. The final position is the position on the two circles added together. To plot the curve we need to consider both circles moving round. If we let the big circle go round once, the small circle will go round four times (once for the large circle rotating and three going round the large circle).  We also need to know the sizes of the two circles, in this case 5 and 1 (I will not give units as only the relative sizes effect the shape).  The path given by these cogs can therefore be encoded as (1,5) + (4,1).

Now recall the parametric formula for a circle: (sin(x),cos(x)), for x between 0 and 2 \pi. This equation allow a computer to draw a circle as we put in values of x and plot the point in 2d. Adding the two circles together therefore we get a parametric formula:

5 (sin(x), (cos(x))+(sin(4x),cos(4x)) = (5 sin(x) + sin (4x), 5 cos(x) + cos (4x))

Note how we would just get the points in the circle repeated four times from the second part (sin(4x),cos(4x)), were it not for the addition. We can therefore consider epicycles as adding circles of different radii, moving at different speeds, together.

Finally we can get to the title and leap to 3d. We can have circles in 3d, so lets add them together. We have an additional problem however. Circles are flat, so the same circle can be put in 3d at different angles, we must also consider the plane in which each circle lies. If we put all circles in the same plane we are stuck in 2d, so where can we put them?

One simple solution is to put the three circles on the faces of a cube:

Cube face epicycles: Left: (2,1)+(17,1)+(23,1) Right: (2,1)+(17,2)+(19,3)

There is something unsatisfying about these curves. For one thing the circles moving on faces reminds more of Lissajous curves rather than spirographs. Although we are adding circles it is hard to see where the cogs might be. Maybe another approach is required. A different approach would be to consider cogs with 45 degree angles. In other words one gear is at right angles to the previous one:

45˚cogs

Each circle other than the first now moves on a plane that itself is moving, staying at right angles to the plane of the previous circle.  It takes a bit of thinking to work out what is happening! So lets cut to two more items from my mathematical museum of dreams:

3d cog spirographs

3d cog spirographs: Left: (1,10)+(20,20)+(61,3) Right: (20,10)+(1,20)+(1,30)+(21,20)

Even better a real version (the work of Richard Grimes):

3d Spirograph by Richard Grimes

[Update: 15/1/10 Daniel Piker has a beautiful animation showing how the circles move for yet another version of the 3d spirograph]

So far we have assumed that we take circles in 2d to circles in 3d. Is this the only analogue of a circle? The circle is a one dimensional object. In two dimensions, therefore it has one less dimension than the space. Perhaps we can consider two dimensional objects when we go to three dimensions. There are two natural two dimensional generalisations of the circle: the sphere and the torus (donut). The torus can be thought of one circle moved round a second, as you can see here the red circles can be moved round the blue circle to make the torus:

As the torus is made up of circles it is perhaps more natural in this setting. We then have five pieces of information to describe a torus. The radii of the two circles and the speed at which we travel round them plus (as with circles) the plane the larger circle lies on.  Playing with these (and again adding two or more tori together gives some very nice objects. I started with one, so here is a second to finish:

Toral Spirograph

Acknowledgements: Inspiration and most of the best ideas on spirographs come from conversations with Richard Grimes. The 3d renderings are made using Blender and LuxRender. Thanks to Ian Hopkinson (@SmallCasserole) for introducing me to this.


How to write machines

November 18, 2009

(If you are coming from Zeilberger’s opinions, the appropriate article is here)

Maths fun was had by all

Last weekend I was in Gothenburg at the incredibly inspiring Free Society conference FSCONS. Of course I was talking about mathematics, specifically how to get people learning it through fun, rather than “because it is useful”. My talk was called “Street Maths” (click for slides).

In discussions with many including Smári McCarthy and Marcin Jacubowski the idea developed further and one result is this (highly opinionated ;) manifesto for literacy.

In 1964 Paulo Freire was arrested and exiled from Brazil for teaching peasants to read. Both sides recognised the power of literacy, as a threat to oppression and a path towards a better life for individuals.

Today in the developed world we take it as an essential. Those who cannot read are not merely marginalised but kept out of society. Yet new skills are becoming necessary. Our formal interactions are now almost more likely to be through a computer than a pen. This change is sweeping through so fast that it can be hard to keep up. We have all joked that the kids teach the adults how to use the latest device.

Lets give the education system its due. The schools curriculum in the UK recognises that for Information and Computer technology (ICT):

…creative and productive use of ICT an essential skill for life.

National Curriculum (ICT) Key Stage 3

How do they suggest we try to achieve this?

The study of ICT should include:

  1. use of a range of information, with different characteristics, structures and purposes, and evaluation of how it matches requirements and its fitness for purpose
  2. use of a variety of information sources, including large data sets, in a range of contexts
  3. use and review of the effectiveness of different ICT tools, including a range of software applications, in terms of meeting user needs and solving problems
  4. developing an understanding of the need to:
    * employ safe working practices in order to minimise physical stress
    * keep information secure
    * manage information organisation, storage and access to secure content and enable efficient retrieval
  5. the impact of ICT on individuals, communities and society, including the social, economic, legal and ethical implications of access to, and use of, ICT.

National Curriculum (ICT) Key Stage 3

Think about these for a second as we consider the skill of literacy. It has two parts. Reading is of course important, but teaching people to read only allows one way communication. We also teach to write. We are taught to use written content, but also to create it. Think about this as you again read the list above. It only talks about learning to “use” ICT.

We need the skills to write and create as well as simply use.  Firstly, for some a bright idea will result in a new use for computers. Just as for some the ability to write leads to a published book. For others some simple creations will help their lives or those close by them, just as some write diaries. Finally there are many who do not write much at all. Yet learning to write writing still helps us develop our reading. The same is true for technology, but it is even more essential. Reading is a fixed skill. A language develops too slowly for reading skills to need much change. This is not the case with computers. The skills to use a particular piece of software can change with a single upgrade, even when we are not forced to change to a more advanced competitor. The usage skills therefore can easily go out of date. The more fundamental skills teach not just the skills to create but the ability to learn; to adapt to rapid changes.

So what skills are needed to create technology? Programming is obviously first. There is, however, a lot more to technology than computers. There are a vast number of ways that gadgets can be used, and will be used. Should we leave people waiting for someone else to make something close enough to what they need? What about adding the basic skills to make things?

Unlike literacy and use of computers these are not new skills. They are in fact ancient. Not a very long time ago if you wanted something you either had to make it yourself, or go to someone who could make it for you. Then we had the industrial revolution. The economy of scale. We came to rely on factories. This now goes so deep we hardly think of making something ourselves. For truly mass items like a hammer or a car, we are probably right.  What about a more specialised device though, like say a tractor? Or a 3d printing machine? Here plans are freely available that require some skill, but not expertise, to build. Including money for building time the product can be made for a fraction of the cost (in many cases 1/10 or less).  Even better, with such open design comes a powerful new option. Take the generic solution and adapt it to your own situation.  With time the design improves as individuals using it make refinements and add options. To do this takes a certain mindset and some basic skills.  A literacy of making.

The natural response to this is that, on top of the skills, tools are required and those tools are themselves prohibitively expensive. Though this is true right now, it is changing. Movements such as FabLabs and Hacker spaces have the tools and make them available for free, or at a small cost.  Even better, the machines can be part of the change.  One of the machines above is a 3d printer, this is not just cheap to produce, it is capable of making itself. The development of other machines has begun, with the ambitious goal of creating a RepLab a multipurpose factory that can create itself at a cost of less than $10000. Even commercially the machines only cost about $100000. Things are changing. Fast. The question is can we get the people in place with the creativity and skills to take full advantage of them?


WoW 6: Gorgeous 4d graphics

May 6, 2009

At some point I should write something about 4d polytopes. They are an incredible work of the human imagination. There are a few places you can find good information on them, just google them.  Or go to the wikipedia page.  If you do the latter you will find some wonderful images.  You might wonder how they were made.  I did, and was very happy for it. Some of them come from an open source application: jenn3d

The still images it produces are beautiful out of the box:

Bi-truncated 8-cell

Bi-truncated 8-cell

Truncated 24-cell

Truncated 24-cell

The great thing is it is open source so you can go in and hack at it to make your own images, it also has a slightly unclear command line format to specify models.

Tetrahedra from truncated 120-cell

Tetrahedra from truncated 120-cell

Maxwell Demon: Website of the week

I am handing out awards, the imaginatively titled “Maxwell’s Demon” website of the week:

wowThere is even a prize, £50.  Though I am lazy so the conditions of this are that the winner:

1) Realises they have won.

2) Contacts me.

3) Puts the logo on their site.

Of course 3 is hard to enforce so you could probably take the money and remove the graphical mess.  I will therefore claim that 3 is to ensure that you are indeed the winner.


Follow

Get every new post delivered to your Inbox.

Join 213 other followers