February 7, 2014
I’ve been developing virtual reality software for a science communication project, but as a side-line I have made “Cubes”: a dreamlike virtual space inhabited by melodic, self-organising and responsive cubes where you fly around and interact by just looking (and a the two mouse buttons to slow down or reset the scene). There is also a version that does not require a virtual reality headset – it’s not a cool, but still kind of fun.
I’m going to submit this to Oculus-Share, but for now you can download both the Oculus and Non-Oculus version here.
February 6, 2014
So it’s quite easy to make hi-res plots of map functions with a GPU. The result is cool and science fictiony:
(click image for higher res) Continue reading
January 29, 2014
Today I needed to do perform a Voronoi tessellation. If I have a set of points on a surface, this is the way of splitting a surface up into areas that are closest to each of the points. Like this:
The blue points are the set of points I started with, and the black lines show the edges of the Voronoi tessellation. Doing a planar tessellation is quite simple, but I wanted to do it on the surface of a sphere. It’s conceptually quite simple, but the algorithm was really annoying to debug. So to save other people the same frustrations, I thought I’d post my python class.
January 5, 2014
We’ve done “chaos is not randomness” before. Here’s another interesting property to do with mixing.
Mixing is a property of dynamical systems whereby the state of the system in the distant future cannot be predicted from its initial state (or any given state a long way in the past). This is pretty much the same as the kind of mixing you get when you put milk in a cup of tea and swirl it around: obviously when you first put the milk in, it stays roughly where you put it, but after time it spreads out evenly. The even spread of the milk will be the same no matter where you put the milk in originally. More formally, if
is a “distribution” or density function of where the “particles” of milk are when you have just put them in the tea, and
is the distribution after seconds. “Mixing” is formally defined as
You don’t have to think about these distributions as probability distributions, but I find it easier if you do. For those that know probability, it is obvious that what the above is saying is that the distribution of milk after a long time is probabilistically independent of its distribution at the start.
In cups of tea, this happens (mostly) because of the “random” Brownian motion of the milk (possibly enhanced by someone swirling it with a spoon).
October 14, 2013
Can you tell the difference between small and far away?
It’s funny because it should be obvious, but actually distinguishing between small and far away based on visual information is slightly tricky to explain.
October 1, 2013
Think3DPrint3D has generously donated 3D printer time and plastic filament to the unusual task of rendering the usually intangible concept of honeybee colour spaces into real, physical, matter!
The first two spaces we printed were chosen by me, in part because I think they are theoretically interesting, and in other part, because unlike some other colour spaces they are finite sized, 3D objects.
October 1, 2013
I’ve been looking at the Expectation-Maximization (EM) algorithm, which is a really interesting tool for estimating parameters in multivariate models with latent (i.e. unobserved) variables. However, I found it quite hard to understand it from the formal definitions and explanations on Wikipedia. Even the more “intuitive” examples I found left me scratching my head a bit, mostly because I think they are a bit too complicated to get an intuition of what’s going on. So here I will run through the simplest possible example I can think of.
September 25, 2013
Sometimes you need to find a rotation matrix that rotates one vector to face in the direction of another. Here’s some code to do it for vectors of arbitrary dimension. The code is at the bottom of the post.
August 23, 2013
Why should we care if someone else is being irrational? and in what way can we know that this is actually the case?
The idea of rationality is often thought of as a consistency within a collection of behaviours or beliefs. For example, if I think it is absolutely wrong to eat meat, I should think it is wrong to eat beef. As beef is a meat it would be irrational for me to think it was wrong to meat but also have the belief that it is OK to eat beef. Similarly, it would be irrational to think that eating meat was abolutely wrong, and then eat a plate of steak. To be rational, my behaviour should also match what I think.
How do we know when we are being irrational? Asking about the rationality of other people seems easier at first. When we observe others, we can spot things that they ought not be doing if they were rational. For example, they might claim to be vegetarian whilst eating a steak. According to most people, I would say, what they are doing is inconsistent. But this doesn’t mean that they do not have a perfectly consistent way of thinking that accounts for their actions and it is us, the majority, who have failed to grasp it. How do you know that someone else is being irrational, not you yourself?
August 22, 2013
An interesting claim I found in the press: there is some concern because GCSE grades in England this year were lower than last year. What caused this?
One reason for the weaker than expected results was the higher number of younger students taking GCSE papers. The JCQ figures showed a 39% increase in the number of GCSE exams taken by those aged 15 or younger, for a total of 806,000.
This effect could be seen in English, with a 42% increase in entries from those younger than 16. While results for 16-year-olds remained stable, JCQ said the decline in top grades “can, therefore, be explained by younger students not performing as strongly as 16-year-olds”.
Newspapers seem to get worried whenever there are educational results out that there might be some dreadful societal decline going on, and that any change in educational outcomes might be a predictor of the impending collapse of civilisation. This alternative explanation of reduced age is therefore quite interesting, I thought it would be worth trying to analyse it formally to see if it stands up.