Tuesday, September 6, 2016

Playing with planets


With the bugs worked out of the Globe program, I felt free to begin spending a bit of time on the planets program.  In section 5.5 of his dissertation, F.K. Musgrave documented a good approach for generating colorful gas giants, building upon the Marble texture described in Ken Perlin's foundational paper, "An Image Synthesizer."  Below is an initial failed but interesting attempt at implementing this.  The failure was caused by integer numbers resulting from default conversions resulting from arithmetic operations between different number types (integers, single-precision, and double-precision floating point).  With that problem resolved by some explicit casts, the end result is as you see in the bottom image.  That's much closer to what I was looking for, though I'm not necessarily happy with the color palette I chose - and everything is still just 2D.  Once I get things working right in 2D I'll combine it with the code from Globe and voila, 3D worlds!  (But fractal worlds only go so far, as I've mentioned before.)







No comments:

Post a Comment