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

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

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