## ELI5: monoids

(Resulting from my claim that “a child of 8 can understand monoids…”) Wikipedia says: “In abstract algebra, a branch of mathematics, a monoid is an algebraic structure with a single associative binary operation and an identity element.” Wolfram says: A monoid is a set that is closed under an associative binary operation and has an… Continue reading ELI5: monoids

Published
Categorized as Maths

When I was young, I read lots of books with titles (or at least subheadings) along the lines of, “Amaze Your Friends and Confound Your Enemies” – a lot of them were filled with tricks and oddities like the Birthday Paradox, or the old saw about the elephant from Denmark. It turns out that if… Continue reading Amaze your friends, and confound your enemies!

## How many bugs are left? The Lincoln Index

You’re working on some software, and you have some QA folks testing it. How do you know how many bugs are left? You know the bugs that the testers find, but how can you estimate the number that aren’t yet found? If your testers work independently, and if your feature is not under continuous development… Continue reading How many bugs are left? The Lincoln Index

Published
Categorized as Maths

## Explaining Maths

Recently, I was talking to my Dad about fiddling about programming the iPad (which I haven’t got around to yet) but I did mention that I might have a go at something simple just to get my feet wet. Beyond Hello, World there are many simple small-to-medium-size projects of course, and I mentioned I might… Continue reading Explaining Maths

Published
Categorized as Maths

## Maths is fun

The other week, a colleague walked into my office and posed the following problem to me: For all n where n is prime and n > 3, show that n² – 1 is divisible by 24. Examples: 5² – 1 = 24; 7² -1 = 48; 11² – 1 = 120. (If you’re interested, give… Continue reading Maths is fun

Published
Categorized as Maths

## Approximating elliptical arcs with BÃ©zier curves

In doing my modulation work with curves and ellipses, I extended the vecto function for drawing an ellipse to enable an oriented ellipse. Lately it occurred to me that this didn’t go far enough in terms of functionality, and I began wondering about how to draw part of an elliptical arc. Vecto’s ellipse drawing function… Continue reading Approximating elliptical arcs with BÃ©zier curves

## A bit of Pythagoras

Given Pythagorean triples that satisfy the Diophantine equation: a² + b² = c² where a, b and c share no common factors, one of a and b must be odd, the other must be even, and c is always odd. First, note that squares of even numbers are always divisible by 4. [Lemma 1] (2n)²… Continue reading A bit of Pythagoras

Published
Categorized as Maths

## Even more on ellipses and splines

Honestly, they’re incredibly interesting. Anyway, I’ll skip straight to the piÃ¨ce de rÃ©sistance: This is a 4-curve cubic BÃ©zier spline modulated onto an ellipse. The ellipse [a=4, b=3] is at an angle of π/4. C1 continuity of the complete curve is preserved. The flickr set tells the story of how I got here. This is… Continue reading Even more on ellipses and splines

## Ellipses & Splines again

After some code cleanup and generalisation, I can now modulate whole splines onto ellipses and onto splines themselves. Here is my simple 4-bezier spline modulated onto an ellipse: And onto itself: Repeatedly modulating a spline onto itself while varying the frequency parameter leads to some interesting and fractal patterns. Nice.

## Splines and modulation

My efforts to equally subdivide a curve along its length have, in part, been leading to this. First, I extended the sampling to work with splines (made up of cubic BÃ©zier curves with c1 continuity). This shot shows 4 curves put together to form a spline: Next, I wrote some code to modulate a curve… Continue reading Splines and modulation