Tuesday, April 07, 2009

Change in Focus

I haven't updated in a while. There's a good reason for that. I've been working on programs and algorithms that were overly grand and got too complicated and big. As I spend more time working on the project, I somehow lost focus.

The more I lost focus of the project, the less interest I had in finishing it. The less interested I am, the crappier the work looked. The crappier it looked the more crushing the disappointment.

I decided to change my modus operandi on my creations. I decided to keep things simple and keep things short. For each work moving forward, I decided to outline a few simple rules for the program and stick with it. The Contention project is an example of the work.

One day, I'll post the complex crappy projects I was working on.

Contention


582443.9-2

Contention

processing java application, april 2009

The premise is simple. I wanted to trace particles as they race towards another particle with the intention of destroying them. Got the idea from the opening scene of Lord of the Rings:The Fellowship of the Ring.

I read somewhere that Steve Jackson had computer programmers create an algorithm to simulate the opening war scene of the movie. Instead of rendering each soldier by hand, he had the effects team create elves that would react when the orcs approach them. This saved time on rendering but it probably ate up CPU.

The concept for Contention is similar. Two teams of particles race towards another particle of the opposing team. Each particle is strengthened by their teammates around them. The more teammates around them, the stronger they are. Once they reach the opposing target, they "roll dice" to see who wins based on their strengths. If the particle wins, they choose another target. If they lose, they start over.

Some basic behaviors were programmed to each particle. Each particle draws a line to any other particle near it. The color of the line is the average of both or all particles around it. Lines are also drawn between the particle and its target particle.

The algorithm was quite simple and this only really took about a couple of hours to draw up. I had some old class files that I reused for this so this was pretty quick and gratifying.

Below are other images created by the algorithm. The original size of each creation is 4800x3600.

Contention Circles

Radial Formation of Contention

Contentions

489319.84

143749.03

50708.785

502848.66

173673.78

More images found at my Flickr site