In the current era of computer programming culture it is rare to see someone implement something totally new. It happens occasionally now but in the 8-bit era everything was new; in the 16-bit era and…
Browsing Category Algorithms
Triangle Plasma
A couple of months ago, out of boredom, I implemented the old plasma fractals algorithm that is emblematic of the late 1980s/early 1990s demoscene, “rectangle subdivision fractals” or whatever you want to call it. It’s…
Quintics Redux
A couple of years ago I wrote a blog post about finding the closest point on a cubic bezier to a given point in which I showed how to reduce the problem to solving a…
Mean Shift Segmentation in OpenCV
I’ve posted a new repository on GitHub for doing mean shift segmentation in C++ using OpenCV: see here. OpenCV contains a mean shift filtering function and has a GPU, I think CUDA, implementation of mean…
Lifelike, or the Joy of Killing Time via Breeding Little Squiggles
A couple of weeks ago I got interested in this project but wanted full control of the code, wanted to know exactly what it is doing, wanted a bunch of features like the ability to import…
My Code for Doing Two Things That Sooner or Later You Will Want to do with Bezier Curves
I just added full cubic bezier curve support to the vector tessellation creation tool I am developing (see here). I’ll include some video at a later date (Update: here) showing this feature in action but first I want…
Discretely Distributed Random Numbers in C#
Random numbers generated from a discrete distribution are a commonly needed thing in game development. By “discrete distribution” we just mean the roll you get from something like an unfair die, e.g. you want a…
Sprite Packing in Python…
(update: newer version mentioned in comments is on github here.) I’ve been working on my puzzle game Syzygy again, after a long hiatus, and am now writing to iOS/cocos2d-x rather than just working on the…