Beginning....

I am aiming to write what I am calling "a toy" (the word game is too heavy for me at the moment). This toy will be a computer graphics application which involves launching pods that grow plant like things (i.e. lots of opportunities for me to play with geometry).

A few caveats:
-all assets (i.e. items my program is currently drawing) are stand-ins (perhaps some art students will want to build me some nice models at some point)
-yes, I intend the final one to be in 3D
-I am human

After thinking about it too much, I finally started with implementing Poisson sampling (in 2D in Processing), because I have to start somewhere.

I have started with R. Bridson's 'Fast Poisson Disk Sampling in Arbitrary Dimensions', because he was kind when I met him once and shared his course notes on animation and it is a nice short paper (and as an academic, I seem to like digesting papers more then tutorials - even though this meant spending overly too much time thinking about this sentence "Generate up to k points chosen uniformly from the spherical annulus between radius r and 2r around xi", because if the theta angle sampling is uniform, is the radius varying between r and 2r also uniformly distributed for the k samples or random, I ended up with uniform).

I fell into all the typical implementing challenges as I went ahead and tried to write the whole thing in one go (i.e. without unit tests).

First I had a bug that resulted in not adding samples near the extents of the space. 

Why aren't their samples near the edges?

Second, just as I was wrestling with myself about going back to write unit tests, my computer ran out of battery and restarted and I lost several days of work (as I am working on this in very tiny momentary breaks so progress was slow and will be very slow).

After wasting time being very mad with myself for not having a github set up (there is one now), I sat down and re-wrote more slowly with more testing along the way.  I am now happy to have relatively pretty 2D sampling. (Keen is of course right on this topic).

Pretty samples

But when I ask my husband which image he likes better, random or Poisson, he picked random... hmmm.... well at least the Poisson gives me a better 'growth' look over time.

Random sampling Poisson Sampling
What do you think? (videos below, random first, then Poisson)




Comments

Popular posts from this blog

growing vines and flowers

NZ Ferns - sampling parametric curves and recursion

I seriously know better but I do it too...