Monday, September 28, 2009
L-99: Ninety-Nine Lisp Problems
Sunday, September 27, 2009
How many trig functions are there? — The Endeavour
How many trig functions are there?
by John on September 25, 2009
How many basic trigonometric functions are there? I will present the arguments for 1, 3, 6, and at least 12.
The calculator answer: 3
A typical calculator has three trig functions if it has any: sine, cosine, and tangent. The other three that you may see — cosecant, secant, and cotangent — are the reciprocals of sine, cosine, and tangent respectively. Calculator designers expect you to push the cosine key followed by the reciprocal key if you want a secant, for example.
The calculus textbook answer: 6
The most popular answer to the number of basic trig functions may be six. Unlike calculator designers, calculus textbook authors find the cosecant, secant, and cotangent functions sufficiently useful to justify their inclusion as first-class trig functions.
The historical answer: At least 12
There are at least six more trigonometric functions that at one time were considered worth naming. These are versine, haversine, coversine, hacoversine, exsecant, and excosecant. All of these can be expressed simply in terms of more familiar trig functions. For example, versine(θ) = 2 sin2(θ/2) = 1 – cos(θ) and exsecant(θ) = sec(θ) – 1.
Why so many functions? One of the primary applications of trigonometry historically was navigation, and certain commonly used navigational formulas are stated most simply in terms of these archaic function names. For example, the law of haversines. Modern readers might ask why not just simplify everything down to sines and cosines. But when you’re calculating by hand using tables, every named function takes appreciable effort to evaluate. If a table simply combines two common operations into one function, it may be worthwhile.
These function names have a simple pattern. The “ha-” prefix means “half,” just as in “ha’penny.” The “ex-” prefix means “subtract 1.” The “co-” prefix means what it always means. (More on that below.) The “ver-” prefix means 1 minus the co-function.
Pointless exercise: How many distinct functions could you come up with using every combination of prefixes? The order of prefixes might matter in some cases but not in others.
The minimalist answer: 1
The opposite of the historical answer would be the minimalist answer. We don’t need secants, cosecants, and cotangents because they’re just reciprocals of sines, cosines, and tangents. And we don’t even need tangent because tan(θ) = sin(θ)/cos(θ). So we’re down to sine and cosine, but then we don’t really need cosine because cos(θ) = sin(π/2 – θ).
Not many people remember that the “co” in cosine means “complement.” The cosine of an angle θ is the sine of the complementary angle π/2 – θ. The same relationship holds for secant and cosecant, tangent and cotangent, and even versine and coversine.
By the way, understanding this complementary relationship makes calculus rules easier to remember. Let foo(θ) be a function whose derivative is bar(θ). Then the chain rule says that the derivative of foo(π/2 – θ) is -bar(π/2 – θ). In other words, if the derivative of foo is bar, the derivative of cofoo is negative cobar. Substitute your favorite trig function for “foo.” Note also that the “co-” function of a “co-” function is the original function. For example, co-cosine is sine.
The consultant answer: It depends
The number of trig functions you want to name depends on your application. From a theoretical view point, there’s only one trig function: all trig functions are simple variations on sine. But from a practical view point, it’s worthwhile to create names like tan(θ) for the function sin(θ)/sin(π/2 – θ). And if you’re a navigator crossing an ocean with books of trig tables and no calculator, it’s worthwhile working with haversines etc.
Related posts:
Mercator projection
Why care about spherical trig?
Three trigonometry topics
What is the cosine of a matrix?
Connecting trig and hyperbolic functions without complex numbers
Friday, September 25, 2009
Dictionary of Algorithms and Data Structures
Wednesday, September 23, 2009
Tuesday, September 22, 2009
The story of the Gömböc
Play this movie to see the Gömböc wriggle. This article is also available as a podcast.
A Gömböc is a strange thing. It looks like an egg with sharp edges, and when you put it down it starts wriggling and rolling around with an apparent will of its own. Until quite recently, no-one knew whether Gömböcs even existed. Even now, Gábor Domokos, one of their discoverers, reckons that in some sense they barely exists at all. So what are Gömböcs and what makes them special?
Balancing act
The defining feature of a Gömböc is the fact that it's got just two points of equilibrium: one is stable and the other is unstable. If you put a Gömböc down on a flat surface, resting on its stable equilibrium point, it will stay as it is. "Even if you kick it a little, it will come back to its resting position at the stable equilibrium point," says Domokos, a mathematician at Budapest University of Technology and Economics. "The other equilibrium point is unstable. You can balance the Gömböc at this point a bit like you can balance a pencil on its tip: the slightest push will make it fall over." It's impossible to balance a Gömböc on any other point: if you try, it will move off in a specific direction. That's why the Gömböc seems to have a life on its own: put it down at a non-equilibrium point, and it will start rolling around in a systematic way until it has reached the stable equilibrium position. In other words, the Gömböc is self-righting.
![]()
A Gömböc made from plexiglass.
"It's a bit like putting a ball on a hilly landscape," says Domokos, "if you put the ball down at a generic point, it will always roll off in the same direction, down into the valley. If you put it on a hill top, it will also roll off, but the direction depends on the direction in which you kick it — that's the unstable equilibrium. Put it in the valley, and it will not roll off at all — that's the stable point of equilibrium."
To give it its full mathematical description, a Gömböc is a three-dimensional, convex and homogeneous object with exactly one stable point of equilibrium and one unstable point of equilibrium. Requiring it to be homogeneous amounts to saying that you're not allowed to cheat: the material from which the Gömböc is made has to be uniform throughout, so you're not allowed to use weights, as those found in roly-poly toys, or other irregularities to get the Gömböc to self-right. Convexity means that the Gömböc is not allowed to bulge inwards, in other words, the straight line connecting any two points on the Gömböc has to lie entirely within the Gömböc. It's easy to create a non-convex shape with one stable and one unstable equilibrium point, hence the restriction to convexity.
Doubtful existence
![]()
An ellipse has two stable and two unstable points of equilibrium.
The reason why many people thought that Gömböcs didn't exist is that in two dimensions there is no convex shape with only two points of equilibrium. "Imagine you have a shape made from plywood," says Domokos, "which is moving between two vertical glass plates. Then the shape would balance at some points. An ellipse, for example, would balance at the centres of its two 'long sides' — these are the stable equilibrium points — and at the centres of its two 'short sides', these are the unstable points." A square can balance on the centres of its four sides, the stable equilibria, as well as on each of the four vertices, though rather precariously, making the vertices unstable equilibria. Similarly, an n-sided polygon has n stable equilibrium points — the centres of its sides — and n unstable ones — its vertices.
It turns out that two stable and two unstable equilibrium points is the best you can do in two dimensions, and it's relatively easy to prove this. The proof basically amounts to showing that a convex shape with just one stable and one unstable equilibrium point makes impossible demands on its centre of gravity (see here for some more detail).
Many mathematicians, including Domokos, concluded that the same result should hold in three dimensions, and they set out to prove it. "The fact that no-one could imagine a three-dimensional shape with just one pair of equilibrium points suggested that it would be worth-while to disprove its existence," he explains. "I tried to do this, unsuccessfully, for a very long time. Then I had a conversation with [the Russian mathematician] Vladimir Arnold, in which he expressed the view that such a shape might exist after all, despite all the rumors going around that it didn't. This made me think in a different way, and I soon realised that the problem was much more beautiful than I had thought at first."
A geometric stem cell
The beautiful fact that Domokos discovered, with the help of his colleague Peter Várkonyi, was that a Gömböc, if it existed, would be a sort of stem cell from which you could "grow" three-dimensional shapes with all other configurations of equilibrium points.
![]()
If you balance a marble at a saddle point, the balancing act is stable in one direction and unstable in infinitely many other directions.
In three dimensions, stable and unstable points are not the only equilibrium points: you can also have saddle points. If your object is balanced on a saddle point, then the balancing act is unstable in infinitely many directions — if you push your object in any of these directions it will topple over — and stable in exactly one direction — if you give it a slight push in that direction, it will come back to the equilibrium point. This is similar to a marble balancing on the mid-point of a saddle. You can make it roll down the sides of the saddle in infinitely many directions, but if you push it exactly along the line running from the front to the back of the saddle, something that's admittedly quite hard to do, it will roll back to the saddle point.
For a convex and homogeneous three-dimensional object, the number of saddle points depends on the number of stable and unstable equilibria: if the object has i stable and j unstable equilibria, then it has i+j-2 saddle points. You can prove this fact mathematically, and it's known as the Poincaré-Hopf theorem. Inspired by this nice relationship, Domokos set out to classify three-dimensional shapes according to their number and type of stable and unstable equilibrium points: given numbers i and j, which objects, if any, have i stable and j unstable points of equilibrium (and therefore i+j-2 saddle points)?
"It was not known if there were objects for each category [formed by an (i,j) pair]," says Domokos. "But we did have some examples. The cube, for example has six stable points of equilibrium [the centres of the six faces], eight unstable points [the eight vertices], and twelve saddles [the centres of the twelve sides]. We also knew about the tetrahedron and many other objects, but there are infinitely many categories. Then we realised that it is always possible to increase the number of equilibrium points by one using a small perturbation." In other words, a small but purposeful deformation of the object would give rise to one extra equilibrium point.
"This is intuitively clear," says Domokos. "If you go on a hike and need to collect some water, then you can dig a small hole, and water will collect in that hole. So with a very small perturbation you have produced a stable point of equilibrium. However, the opposite is not true: getting rid of a lake [which contains a stable equilibrium point] is no easy job. Similarly, if you have an object, it is generally not easy to get rid of an equilibrium point, but it is possible to create one." Domokos and Várkonyi found an explicit algorithm telling you exactly how to endow a convex and homogeneous three-dimensional shape with an extra equilibrium point.
This result was momentous as far as the not-yet-discovered Gömböc was concerned. "It told us that if you had an object [with the minimal number of equilibrium points, one stable and one unstable], then this would prove that objects exists in all other classes too, because you can increase the number of equilibrium points one by one. So this object would be like a stem cell: you could derive the existence of all other categories from it, but you couldn't derive its existence from bodies with higher numbers of equilibrium points. Mathematics is all about beauty, and this result is very beautiful."
Mathematical field work
![]()
Pebbles from beaches on the island of Rhodes. The left pile contains convex pebbles and the right pile contains concave pebbles.
But despite this tantalising beauty, Domokos and Várkonyi's attempts to prove the Gömböc's existence remained futile, so Domokos took a desperate measure. On a holiday to a Greek island he and his wife collected and inspected 2000 beach pebbles in the hope that they might find one behaving like a Gömböc. It was a strenuous effort, which a weaker relationship may not have survived, and it failed. "We learned very interesting things from a pebble point of view, but nothing from a Gömböc point of view," says Domokos. "We were tired and depressed. When you looked at these pebbles you got the feeling that even if you went to all other Greek islands, you would never find [one behaving like a Gömböc]. But why not? If this type of pebble doesn't exist, then there must be a mathematical reason for this."
This line of thought led to an important insight into the Gömböc's nature: Domokos and Várkonyi realised that a Gömböc, if it existed, could not be very flat, or very thin. A flat object, like a frisbee, generally has two sides, and contained in each there'll be a stable equilibrium point — that's one stable equilibrium too many for a Gömböc. A thin object, like a pencil, will generally have two unstable equilibrium points at its two tips, so it cannot be a Gömböc either.
The perfect figure
![]()
Thin objects like this pencil generally have two unstable points of equilibrium at their tips, while flat objects, like these pebbles, generally have two stable points of equilibrium.
Domokos and Várkonyi made their intuition precise by giving a formal mathematical definition of what they meant by flatness and thinness, each measured by a number greater than or equal to 1. They then proved that a Gömböc's flatness and thinness both have to be equal to 1, that is, both values have to be as small as is possible.
The result gives some insight into why the Gömböc is only just teetering on the brink of existence. If you make a Gömböc just a tiny little bit thinner or flatter, then its flatness and thinness values aren't minimal anymore. So according to the result, the object stops being a Gömböc — it must have gained extra equilibrium points, or stopped being convex.
The Gömböc's sensitivity to change means that a Gömböc-like pebble can only exist for a short time on the sea shore before other pebbles, moved by the sea, start chipping away its Gömböc-ness and turn it into an ordinary pebble. "It's a fundamental question," says Domokos, "to which you expect a clear-cut answer: something should either exist or not exist. But in the case of the Gömböc, the answer is that it does exist, but barely so. If you drop it, it ceases to be what it was, so physically, it is a very fragile existence."
Finally, a Gömböc!
Having thus explained why they had not been able to find a Gömböc on the beach, Domokos and Várkonyi drew new hope and tried a new line of attack in their search for a proof of its existence. In two dimensions a Gömböc is impossible because it needs a balancing that would require the centre of gravity of the shape to be in two places at once. But in three dimensions there is more space to balance things out, so Domokos and Várkonyi started tinkering around with various shapes until they had a description of an object with all the required Gömböc properties.
Many mathematicians would have stopped there — if you can prove that something exists, then why go on to build it? — but Domokos and Várkonyi wanted their very own Gömböc to take home. This proved difficult, as their initial construction was too close to an actual sphere. "The deviation from the sphere was only 10-5," says Domokos, "so with [a diameter of 1m], the object would differ from a sphere by a only hundredth of a millimeter." This surpasses the precision of even the most sophisticated tools. If you try to manufacture such a Gömböc, all you'll ever get is to all intents and purposes an ordinary sphere.
The problem was that Domokos and Várkonyi had wanted their object to be as smooth as possible, avoiding sharp edges as far as they could. It was only when they let this requirement go that they came up with a new and buildable version of a Gömböc. That's the version you can see in the pictures — note the sharp edges. But even this buildable version requires an incredible level of precision: the Gömböcs are now being manufactured using computer controlled machining with precision tolerances below 10 microns — that's about a tenth of the thickness of a human hair!
Gömböcs in nature
Play this movie to see a tortoise behaving like a Gömböc While the Gömböc made a good job of hiding from mathematicians, it didn't escape the penetrating gaze of evolution. Thinking that Gömböc-like shapes must appear somewhere in nature, Domokos turned his attention to tortoises. Being turned on its back is a potential disaster for any tortoise, so much so that the males in some species try to turn over their rivals during their battles for females. So any tortoise that's able to struggle back on its belly has an evolutionary advantage. Some species of tortoise manage to turn themselves back over using their muscular necks as a lever, while many others can't self-right at all.
Domokos started an extensive search in pet shops and zoos, turning over tortoises while their owners weren't looking, and finally found what he wanted: "Suddenly one day I came across the first little tortoise that was doing exactly what it was supposed to do," he recalls, "it was acting like a Gömböc!" The shell of this high-domed species is similar to a Gömböc — it contains no stable equilibrium point, so when an individual is put on its back, it automatically flips over into the only stable position: lying on its belly. Domokos conducted an extensive study of tortoises using a complex three-dimensional model of their shell, and identified two species, the Indian star tortoise and the radiated tortoise, which use their Gömböc-like shells to self-right. The results of his research were eventually published in the biological journal Proceedings of the Royal Society B in a paper co-authored by Várkonyi, and biologists have accepted that the Gömböc-like shells are indeed a result of natural selection in favour of the ability to self-right.
The Gömböc adventure has led Domokos to look deeper into the evolution of shapes in general. He's currently developing ways of deducing the habitat of a tortoise from the shape of its shell, a project that will enable scientists to learn more about the living spaces of extinct tortoises, of which only fossilised shells remain. He's also developed a model which explains how asteroids, that aren't round like planets, but have sharp edges and flat areas, evolve their shapes (the paper has been published in The Astrophyiscal Journal).
So the Gömböc, which started out as a question in the mind of a mathematician, not only exists in the abstract, but also in nature. And who knows what lies ahead of it in terms of human-made applications? For the moment, though, the Gömböc is being produced for purely aesthetic reasons, and enthusiasts can purchase their very own model on the Gömböc website. And if you find yourself close to Cambridge, you can come and admire a real Gömböc at the Whipple Museum of the History of Science, to which it was donated by Domokos and Várkonyi in April this year.
For a more technical look at the topics covered here read Domokos and Várkonyi's articles Mono-monostatic bodies: The answer to Arnold’s question and Static equilibria of rigid bodies: dice, pebbles, and the Poincaré-Hopf theorem . To hear Domokos himself speak about the Gömböc, listen to the podcast accompanying this article.
mechanics geometry equilibrium gömböc astronomy physics tiling relativity symmetry computer graphicsAbout this article
![]()
Gábor Domokos
![]()
Péter Varkonyi
Marianne Freiberger, Co-Editor of Plus, interviewed Gábor Domokos in Cambridge in May 2009.
Monday, September 21, 2009
Battle of the buzzwords: Apple vs. Microsoft - Apple 2.0 - Fortune Brainstorm Tech
Apple vs. Microsoft
The Buzzwords
Elephant On Trampoline
Dingen die ik me dan afvraag:
- Werd de slurf, staart en oren geanimeerd(manueel door mens) of gesimuleerd(automatich door software)
- Hoe lang duurde het om een gemiddeld beeldje te renderen
- Om dit in het echt te kunnen doen hoe sterk zou de trampoline moeten zijn, welke materialen zijn nodig
Sunday, September 20, 2009
Thursday, September 17, 2009
The horror of blimps
Wednesday, September 16, 2009
Monday, September 14, 2009
Saturday, September 12, 2009
Charles Darwin film 'too controversial for religious America' - Telegraph
By Anita Singh, Showbusiness Editor
Published: 4:53PM BST 11 Sep 2009
Paul Bettany plays Charles Darwin in Creation Photo: ALLSTARCreation, starring Paul Bettany, details Darwin's "struggle between faith and reason" as he wrote On The Origin of Species. It depicts him as a man who loses faith in God following the death of his beloved 10-year-old daughter, Annie.
The film was chosen to open the Toronto Film Festival and has its British premiere on Sunday. It has been sold in almost every territory around the world, from Australia to Scandinavia.
However, US distributors have resolutely passed on a film which will prove hugely divisive in a country where, according to a Gallup poll conducted in February, only 39 per cent of Americans believe in the theory of evolution.
Movieguide.org, an influential site which reviews films from a Christian perspective, described Darwin as the father of eugenics and denounced him as "a racist, a bigot and an 1800s naturalist whose legacy is mass murder". His "half-baked theory" directly influenced Adolf Hitler and led to "atrocities, crimes against humanity, cloning and genetic engineering", the site stated.
The film has sparked fierce debate on US Christian websites, with a typical comment dismissing evolution as "a silly theory with a serious lack of evidence to support it despite over a century of trying".
Jeremy Thomas, the Oscar-winning producer of Creation, said he was astonished that such attitudes exist 150 years after On The Origin of Species was published.
"That's what we're up against. In 2009. It's amazing," he said.
"The film has no distributor in America. It has got a deal everywhere else in the world but in the US, and it's because of what the film is about. People have been saying this is the best film they've seen all year, yet nobody in the US has picked it up.
"It is unbelievable to us that this is still a really hot potato in America. There's still a great belief that He made the world in six days. It's quite difficult for we in the UK to imagine religion in America. We live in a country which is no longer so religious. But in the US, outside of New York and LA, religion rules.
"Charles Darwin is, I suppose, the hero of the film. But we tried to make the film in a very even-handed way. Darwin wasn't saying 'kill all religion', he never said such a thing, but he is a totem for people."
Creation was developed by BBC Films and the UK Film Council, and stars Bettany's real-life wife Jennifer Connelly as Darwin's deeply religious wife, Emma. It is based on the book, Annie's Box, by Darwin's great-great-grandson, Randal Keynes, and portrays the naturalist as a family man tormented by the death in 1851 of Annie, his favourite child. She is played in the film by 10-year-old newcomer Martha West, the daughter of The Wire star Dominic West.
Early reviews have raved about the film. The Hollywood Reporter said: "It would be a great shame if those with religious convictions spurned the film out of hand as they will find it even-handed and wise."
Mr Thomas, whose previous films include The Last Emperor and Merry Christmas Mr Lawrence, said he hoped the reviews would help to secure a distributor. In the UK, special screenings have been set up for Christian groups.
Welcome to the FOOKUNITY
Friday, September 11, 2009
Wednesday, September 9, 2009
Tuesday, September 8, 2009
List of New 3rd party Ubiquity Commands
List of 3rd party ubiquity commands https://wiki.mozilla.org/Labs/Ubiquity/Commands_In_The_Wild
Pixel Art map of Beijing
Blog Archive
-
▼
2009
(48)
-
▼
September
(25)
- L-99: Ninety-Nine Lisp Problems
- How many trig functions are there? — The Endeavour
- Dictionary of Algorithms and Data Structures
- Amazing Monster Machine
- Sometimes you have to move something
- MP3 Inventor Demonstrates First Working Laser Mic ...
- Saturn Equinox Reveals Mountains in Rings | Wired ...
- The story of the Gömböc
- Battle of the buzzwords: Apple vs. Microsoft - App...
- Elephant On Trampoline
- Make: ILoveSketch, a gesture-based 3D sketchpad
- The horror of blimps
- What's wrong with this picture? (Scripting News)
- bobby-tables.com: A guide to preventing SQL injection
- Mantis
- Charles Darwin film 'too controversial for religio...
- Welcome to the FOOKUNITY
- Borderlands
- Tower Crane Assembly with Climber Demo
- Pines of Arcadia: Have Some Water, Courtesy of Ber...
- Dual-Pivot Quicksort (By Vladimir Yarosla)
- The Hierarchy Of Digital Distractions | Informatio...
- Powers Of 10
- List of New 3rd party Ubiquity Commands
- Pixel Art map of Beijing
-
▼
September
(25)



