News for hackers. Stuff that matters.
Re:Fractional Brownian Motion for Terrain Generation by mlevental on Monday October 07, 2019 @09:59AM (#21180847)
do you mean ifft?
Re:Fractional Brownian Motion for Terrain Generation by enriquto on Monday October 07, 2019 @10:03AM (#21180879)
yes, but it's the same algorithm
Re:Fractional Brownian Motion for Terrain Generation by mlevental on Monday October 07, 2019 @11:56AM (#21182365)
yes but i'm asking about what you were really trying to say - are you trying to say one can generate these textures by specifying a filter (transfer function or whatever you want to call it) with a random phase component? and then take ifft to get the definition in space?
Re:Fractional Brownian Motion for Terrain Generation by notfashion on Monday October 07, 2019 @12:11PM (#21182540)
If I understand this correctly, it's not even a matter of using a filter, just a case of summing some random sinusoids with an appropriate weighting for each according to the frequency. You can do this by starting off with noise in the frequency domain and shaping it before doing an iFFT.
Re:Fractional Brownian Motion for Terrain Generation by enriquto on Tuesday October 08, 2019 @02:55AM (#21189489)
Yes, I meant exactly that. You build a spectrum by setting the amplitudes to the desired decay law, and the phases to random. It is an octave/matlab one-liner.