Pages to see:

Entries in code (5)

Thursday
Jul022009

Recursion...First Attempt

I have a goal of using cellular autonoma to simulate tree growth. This program is an alpha-draft of that, hyper early on in the development cycle. I am pretty sure none of this code will go onto be used in latter versions, but I learned about recursion and that's a good benefit. It is drawn segment by segment, and each segment calls two more. It recurses (I think that's a word) for a random time (well 50% chance of continuing that branch). I added in the ability to start a segment from where you click, it's kinda fun I think...you can paint with the branches. To get the middle branch to stop drawing new branches just hit the 'o' key. Code after the jump...

Click to read more ...

Thursday
Jul022009

A Circular Vortex...spinning...spinning.

While putting off my blob addition to the Gnat swarm, I decided to see what a little trig and a whole lot of lines could get me. So I mixed some color in with the reducing radius and it turned out pretty well I think. Especially for maybe an hour of coding. Vortex is after the jump...

Click to read more ...

Thursday
Jul022009

Color Quickie Redux

This rather simple program just uses the X and Y position of the ball for the background color information. Code after the jump....

Click to read more ...

Tuesday
Jun302009

Color Quickie

I realized I had been basically only programming in black and white, so I decided to play around with color for a bit. It's a pretty simple demo, but I felt like it should still be shared. Code after the jump to save your processor.

Click to read more ...

Tuesday
Jun302009

Gnat

I like to code in Processing. It does all the hard parts of graphics for you, so you can just concentrate on the coding. I have some back code that will get posted eventually (hopefully) but for now I'm going to share a project that I've been working on recently. Late on night in my room, I wanted to code something but couldn't think of what to code. As I sat there pondering, a gnat was bumbling around infront of my computer screens. I noticed that it had a wierd flight pattern. It looked like it almost jumped from one place to another randomly, but with some overall directional sway. I realized this is what I should code, so I did and here is the fruit on my labors. Or atleast a relatively stable, version that incorporates a decent amount of features yet still pretty early on in the evolution of the code. It's after the jump (so it doesn't run on load, cause my programs are usually a bit processor intenseive)

Click to read more ...