Posts

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

Image
I have a renewed sympathy for my students (especially in cpe 476) when merging various pieces of code... I decided to merge all my plant growth algorithms into one code base with an animation event system, unified spatial data structure, poisson sampling throughout and 'camera' in 2D to allow for a larger world then currently in view... and I did it all at once and not surprisingly ended up with an intimidating bug list that put me off being productive for too long.   I admit this here mostly to continue to remind myself to be sympathetic to students.  For me, one of the pleasures of coding is how fast you can make 'something'.  When coding, it is easy to get greedy and want to add many features at once, but like any creation, this is not necessarily the best approach.  For me the worst part is an overly long bug list... it is hard to be productive when the list of 'to-dos' is really long.  I have seen this in action in cpe 476 so many times... teams that are

growing vines and flowers

Image
Programming is so interesting because even after over 20 years I mis-estimate the complexity of certain tasks.  Some things that seem simple can suck up hours and things that seem intimidating can occasionally end up being 3 lines (of albeit complex but doable) code. I have been muddling through growing vines (confession, I consciously decided not to look for any reference material, because I wanted to try out some ideas on my own -- if you know of a perfect reference, feel free to email me, I just might ignore it until I am 100% happy with my own muddling). I knew that I wanted a system that would allow vines to toggle between various types of 'growing' behavior and that ultimately the system offered interesting design decisions about where to put data (between vine state and growth function state).  Even knowing this, I started out with a naive solution in mind that I wanted to try, thinking to myself, 'I'll redesign it better after one iteration'.  Now 3 ite

NZ Ferns - sampling parametric curves and recursion

Image
I still remember my intro programming professor, who went on to be a great undergraduate advisor, (shout out to A. Pang at UCSC), teaching our class about recursion. He asked if anyone had really looked at the structure of a fern and how each leaf is made up of many branching little leaves, with each little leaf sharing the same overall structure repeated, (i.e. many branching smaller leaves), etc. After lecture, I wandered out into UCSC's lovely grounds and found a fern leaf and really looked at it. I have always liked recursion (but like many of us, I sometimes shy away unnecessarily). Here in New Zealand there are amazing giant fern trees and they've been cleverly incorporated into a lot of graphic design (including the almost winning revised 'silver fern flag')* Photo of one of the many ferns we've seen Kyle Lockwood's silver fern flag design  By Kyle Lockwood - Traced from the design gallery for the New Zealand flag referendums, 2015–16See mo

Beginning....

Image
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