Oh awesome. I do wish I could remember all the nice math tricks. But sadly there is too many complicated things for me. I do really like math, so thanks for sharing Still I wish there was a way to actually paint directly on the surface. And use direct UV space of the ground instead of world space.
Glad you got use out of it. Hope to see some screenshots of that.