Tag Archives: Math

OVM Pseudo-Algebra and Surreal Numbers

Was just watching this funny video on Numberphile:

Here is the Surreal Numbers book on archive.org:


Got a kick out of the story around this stuff… When Knuth shows the notation for surreal numbers I suddenly remembered a weird program I’d written awhile back.


I had been out drawing in my sketchbook one sunday (almost 2 years ago) and found myself creating a tiny little system of symbols:

A few days later I speed coded a version of the system. Apparently I had posted a screenshot on FB while I was working on it:

See if you can figure out how it works. I’m sure the code could be cleaned up a bit…

While OVM has little/nothing to do with Surreal Numbers - I’m glad the video reminded me it…

Posted in Math, misc | Also tagged , | Leave a comment

Hermit Crab Curve as PRNG

(a deterministic pseudo-random number generator with contrast and smoothness - inspired by stochastic and organic randomness)

Around 2015 I had the idea for a PRNG that would clamp itself and have moments of “smoothness”. When I got around to trying to create such a thing, the result was something I jokingly called the “Hermit Crab Curve”. I also called it the “Shard Curve”.

The equation for the curve defines a radius in polar coordinates:

Where a and d are paramters that control the detail of the curve. o is a rotation and offset value for the angle and s is a scalar. Note the use of rem. The resulting curve is much less interesting if a standard modulo is used in place of a remainder:

The above variable values were found using this interactive version of the equation:

To illustrate how you might use this as a PRNG I created this fork of the above pen:

That, in combination with the information from my other article from yesterday… Should be enough to see what I mean.

You can read the original description of the Hermit Crab Curve that I created using ArcType here:


If you end up using this for something interesting let me know. I’d love to see it :D

Posted in Graphics, Math, functions, graphics algorithms, javascript, misc, motion | Also tagged , | Leave a comment

Harmonic Series

  1. var harmonic:Number = 0;
  2. var k:Number = 1;
  3. addEventListener(Event.ENTER_FRAME, onLoop);
  4. function onLoop(evt:Event):void {
  5.      harmonic += 1 / k;
  6.      trace("+");
  7.      trace("1 / " + k + "              =              " + harmonic);
  8.      k+=1;
  9. }

Read more about the harmonic series at wikipedia.

1 / 1 = 1
1 / 2 = 1.5
1 / 3 = 1.8333333333333333
1 / 4 = 2.083333333333333

Posted in Math | Also tagged , | Leave a comment