## 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 […]

## 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 […]

## 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 […]

## Quick Post: Geospheres

I don't have time to write this one up--I will later! But for now, here's a demo. Hit enter to subdivide the mesh into a more accurate sphere. Hit 'p' (repeatedly) to add procedural noise to the mesh. 'w' and 'd' rotate left and right.

## Why quaternions?

We can represent 3D rotations in a variety of ways, arguably the most useful of which is the matrix. In three dimensional space, a 4x4 matrix usually defines the world transform of an object, because it can contain lots of information: translations, rotations, scale, and lots more. But when we're talking simply about rotations, there's […]

## Why you should think five times before writing a singleton

In a debate, a common tactic is to concede some small amount of truth against your own viewpoint. It softens up the opposition by getting them to agree with you early on. So here we go: Singletons are handy and can be useful. Now on to the debate. Common Problems with the Singleton Pattern 1 Many […]

## On functional programming in classical languages

AS3 is certainly not strictly classical (there's a Class::prototype object for Pete's sake!), but it's got a lot of the classical garb. Anyway, today I was rummaging around in a class in our codebase called FunctionUtils and I decided, whilst fixing a few things, why not add a couple of the fun functional constructs?! Function::schönfinkeling […]

## Small Static Factory Methods

You know how Cocoa classes generally have static methods that serve as factories? return [NSArray arrayWithObjects:obj1, obj2, nil];return [NSArray arrayWithObjects:obj1, obj2, nil]; That's a dumb example, especially now that you can do @[obj1, obj2], but why not do the same in AS3? For instance: return TransactionResponse.FailedResponse();return TransactionResponse.FailedResponse(); This would replace something like: var response:TransactionResponse = […]

## RestExpressionNode not yet implemented

Perhaps the least helpful MXMLC error message yet: public function log(level:int, message:String, ... rest):void { trace(format(level, message, ...rest)); }public function log(level:int, message:String, ... rest):void { trace(format(level, message, ...rest)); } Apparently calling a function with ...rest on accident will present this compiler error...

## Why Inheritance Is "Broken"

Prologue A coworker of mine recently told me that interfaces were for him, a purely academic exercise and that outside of a CS degree, he has never used one. I almost slapped him, railing the age-old battle cry, "favor composition over inheritance!" but all I could do was let out a frail whimper. You see, […]