Reflections in spheres

January 25, 2010

Reflections in 4 spheres

I love mirrors. They can create some very interesting mathematics. It is therefore surprising that although I have been working with raytracers (which do reflection very well) for quite a long time that I have never used them to look at reflections. I have finally dealt with that omission.

The image above looks at four spheres placed at the corners of a tetrahedron so that they are nearly touching. Without the mirror finish they would look like this:

The four spheres without reflection

In order to get more pictures, and to help understand the pattern of reflections I now started to colour the surroundings. As we look at the spheres our gaze is bounced around until it eventually heads away from the spheres again. The question is, at that stage what direction is our view going. In other words, what are we actually looking at within all the reflections? To show this I created the set up below:

Reflection set up

As you can see the spheres are in a yellow bucket with a blue bottom and red top. The position of the camera is shown with a black cuboid and the light is the white sphere.  The red top will be pushed over the model for the images and the light switched on! Note that I place the light behind the model so we would not see it in direct reflection. So what do we get?

Up, level and down colours

Now we can see whether we are really looking up (in red) level (yellow) or down when we look at the reflections. Can you look at the image and work out more about the paths various lines will take before heading out? The beautiful structure comes in as there are paths that take a very long, or even infinite time to leave the spheres.

A second image looks for right and left:

Left (Blue) and Right (Red)

Finally just for fun, an image where the back sphere is glowing so you can see how it is reflected around the front three spheres:

Glowing back sphere

For more on the mathematics of sphere and circle reflections, and how they can be generalised to whole geometric worlds (with great images) see Indra’s Pearls, you can also use the blender file for these scenes.


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.


LMS internet communication 2

January 3, 2010

As promised here is a draft of my article on ideas for the LMS and using the internet for society communication. Please comment!

Currently the LMS has two main mean of communication. The first is the newsletter and the second the website. It has already been mentioned many times that the website is in need of a redesign. I will therefore concentrate on the options available for more general communication. In a way the modern version of the newsletter, however some of the ideas here might inform decisions on the redesigned website.

What options are available?

The first option is RSS/web feeds. Using these people can subscribe to the stories from the LMS and then let the system take over. The stories would then come in automatically mixed with their other news in the reader. If this is set up as a blog people will have the ability to comment back on stories and announcements. The futurelms blog has shown that their are people willing to engage in this manner, and have good comments to make.

The second option to consider is twitter. This is a new system and has been the subject of plenty of hype. The important thing to realise is that although much that travels over twitter is meaningless noise people can choose what they follow. It is thus reasonably easy to find the signal. It is thus a system that has attracted a large number of people who are worth following and talking to (whatever your definitions of those). I would single out in particular Lord Drayson (@lorddrayson) the Science minister who has used the system well, getting feedback and reacting to the concerns of scientists as well as simply broadcasting his messages. This engagement, as an example, generated a debate on science journalism between him and Ben Goldacre.

The final option are wikis. These obviously take their lead from the wikipedia. Essentially they provide a means for a community to jointly create web pages.

How can the LMS use these?

I want to start with a general comment. Whatever options the LMS decides to follow two things will be necessary for success (unfortunately they are not sufficient). The first is to commit to the system, with the suggestions below I will give some of idea of what this means. The second is to make the system as open as possible. If there are problems with spam inappropriate content etc, then these can be dealt with at the time, but trying to address all possible problem can easily create an unworkable system.

Another general comment is that all the communication should consider the entire community of mathematicians and maths related people in the UK. This will have a positive effect on membership as it will make the importance and role of the LMS clearer to everyone.

A blog for LMS news is the first, obvious option. In many ways this will take over from the newsletter (I will discuss that further below). This will enable news to come out in a more timely fashion (the newsletter can be a long way behind due to the constraints of printing and a monthly schedule). It will also allow comments in response to articles. As I mentioned above this would need commitment. There should be a dialogue, not just a broadcast. It would be important for the commentators on the blog to feel that their views are listened to, and regular responses to comments are therefore essential.

Taking the dialogue a step further would give the LMS an active twitter feed. Again this should not be considered a broadcast. This could be a way to get opinion and feedback from a variety of people both within and outside the LMS. Watching replies and responding would therefore be essential.

A final, and more radical step would be to open up the process of creating policy. This is where a wiki can come in. In draft form policy documents can be freely edited and discussed. Anyone with an interest in the topic can therefore express their view. This is something that might need to be restricted to members alone. Obviously the final document would be the work of council or the committee involved, however this would draw more people into the descision making process and allow the society to tap as much available expertise as possible, not just the (admittedly great) expertise of those who can commit themselves full time to council.

Going slightly beyond the idea of communication within the LMS the world is currently lacking good computer based news streams for mathematics. This is something that the LMS is perfectly positioned to provide. The stream could be a mix of simple links to important papers or events combined with the occasional specifically written article. Members of the LMS would form a natural pool to write these! It would of course help if they could be given some level of LMS blessing as a publication. The systems for dialogue (twitter and blogs) would give an excellent basis for this as people could put forward the stories that they felt were important.

How to implement this?

I have said above that commitment is an important part of these ideas. Unfortunately as it is the nature of things this does cost money. Some of the money is already spent. Their are people involved in writing the articles and gathering news for the newsletter for example. Some more money can be found by stopping the newsletter itself. The cost of printing and distribution can therefore be put into maintaining the online presence. This step will of course leave some people out of the loop as not everyone is using online newsfeeds. A half-way house option would be to produce the newsletter as an email (or pdf). This would be made up of the stories and events that had been posted during the last month. With a little investment in programming it could even be automated.


Follow

Get every new post delivered to your Inbox.

Join 213 other followers