Not magic, just a different kind of science.

# Algorithms

## Quick Post: Sum Table

If you have an array of values, how can you take the sum of any range of them in constant time? With a sum table! Here’s a formal definition: Given a list of values $$v_0, …, v_n$$, then a sum table is a corresponding list $$s_0, …, s_n$$ such that $$s_i=\sum\limits_{j=0}^i v_j$$. That is, each […]

More## Spherical Terrain Generation

Update: part 2 here. I posted a terrible demo a few weeks ago of a geosphere with some procedural mesh perturbation– then I ran off and never explained it. Then, in my last article, I finally walked through the magic behind geospheres. In this article, I refined my approach to spherical terrain generation and finally […]

More## Geosphere: Revisited

Update: At long last, the SO answer has been found! Added a link. Lately I’ve been shrinking my goals so that I can actually reach them. I mean, I’d rather have fifty small projects that have all been completed than ten large ones that haven’t (you wouldn’t believe how many things I have 90% completed […]

More## Procedural Texture Fun

I’ve been having a ball going through the book Texturing and Modeling: A Procedural Approach. I’ve hardly cracked the book, really–but so far it’s been a lot of fun. One of the first procedural textures it studies is a brick texture. The book assumes you’re using RenderMan, but Unity’s surface shaders are actually very similar […]

More## An algorithm for suffix stripping…

Years ago when I programmed networking applications in Perl, I decided I had mastered regular expressions. I hadn’t, of course, but when your code looks like you accidentally opened up a .dll in notepad, you have to believe in something. Anyway, I wrote something called a vector space search engine (a topic I will probably […]

More## Terramorphic Genesis Algorithms (or Terrain Generation)

My fascination with the game Scorched Earth knows no bounds. One might say I am the Mother of All Scorched Earth Fans. One of my earliest fascinations with the game (keep in mind, I was like 10) was that I could play for hours and hours and never play the same level twice. The ground […]

More