Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!attctc!vector!jonb From: jonb@vector.Dallas.TX.US (Jon Buller) Newsgroups: comp.graphics Subject: Re: Turbulence functions Message-ID: <742@vector.Dallas.TX.US> Date: 14 Sep 89 17:46:43 GMT References: <14364@netnews.upenn.edu> Reply-To: jonb@vector.Dallas.TX.US (Jon Buller) Organization: Dallas Semiconductor Lines: 26 I still have my code, and it is still in pascal (I unfortunately do NOT have a C compiler for my Mac, or hard disk to put it on...), but if everybody wants it again, I'll post it. If you will kindly note the .sig or return path, you will find that I have gotten my degree from Colo. State and have moved to Dallas in pursuit of the task of putting food on my table. I saw my code translated to C and archived at uunet.uu.net if the requesting persons desire it there. I do not belive that the turb() function was translated, but it is a simple hack. turb(x) = noise(x) + noise(2*x)/2 + noise(4*x)/4 ...) do this until noise is small enough to make a change for a single pixel. i.e. calling turb on a region from 1 to 10: call noise up to *8/8 or so (you might want to go to *16/16 to be sure of everything) I wrote a routine that generated a complete planet image (water, land, and clouds) with a call to turb for choosing land or water, and another call to add clouds. Then all you need is a sphere to apply the texture to (I have been tempted to apply that texture to a cube for fun, maybe in a few days...) In any case, enjoy... Jon -- -------------------------------------------------------------------------- Jon Buller texbell!vector!jonb jonb@vector.dallas.tx.us FROM lawyers IMPORT Disclaimer; FROM fortune IMPORT Quote;