closer
simplified but incorrect averages
averaging correctly
more readable
building and randomizing
getting there
better, but not as good as my original flash version
that's better
simplified average
float32 for smoothness
link