Digital crystal 2

Posted by Dan on Aug 5th, 2009
2009
Aug 5

RedBlueAlphaCrystal

 

Here I deal with the edges by having them fade away.  The “mountains” are due to a programming error.  I’m used to doing colors in RGB coordinates (red-green-blue) where I can blend two colors by taking a simple average.  Here I’m using HSV coordinates (hue-saturation-value).  Saturation and value can be averaged, but hue is a circular coordinate.  It’s like trying to average East and West… is the answer North or South?  Both or neither? 

I think the crystallization works better in HSV, so now I blend by converting to RGB, averaging, and converting back to HSV.  Lots of number crunching, lots of conversion formulas to learn, and a few accidental mountains to look at.