====== atCalc_FFT ======
===== Plugin information ===
^ Author | [[user>Aaron]] |
^ Description | A plugin to calculate the fast Fourier transform (FFT) of the heightfield, and the inverse transform. |
^ Download link | [[http://www.bundysoft.com/L3DT/downloads/plugins/bin/atCalc_FFT-bin.zip|atCalc_FFT-bin.zip]] (135kB) |
^ Source code | Available on request. |
^ DLL version | v2.7.1.0 (26th of March 2009). |
^ Dependencies | L3DT build 2.7 or later. |
===== Using atCalc_FFT =====
==== Applying the forward transform ====
To calculate the fast Fourier transform (FFT) of the heightfield, select the '//Extensions->atCalc_FFT->Calculate FFT of heightfield//' menu option. The output will be two maps called "HF_FFT_Amplitude" and "HF_FFT_Phase", which will be added to your project. For a typical noisy heightfield, these maps will look like:
| {{:plugins:calc:atcalc_fft:fft_amp.png?300|:plugins:calc:atcalc_fft:fft_amp.png}} | {{:plugins:calc:atcalc_fft:fft_phase.png?300|:plugins:calc:atcalc_fft:fft_phase.png}} |
^ Amplitude component ^ Phase component ^
Note that both maps are normal floating-point maps. The phase map appears in colour because the default palette for the phase map is "rainbow", which maps the -PI->PI value range into a blue->red colour range.
==== Applying the inverse transform ====
To calculate the inverse transform, select the '//Extensions->atCalc_FFT->Calculate heightfield from inverse FFT//' menu option. This will overwrite the heightfield by inverse-transforming the "HF_FFT_Amplitude" and "HF_FFT_Phase" maps created by the previous use of the 'Calculate FFT of heightfield' menu option (see above).
The output of the inverse transform of the amplitude/phase images is a hightfield such as this:
| {{:plugins:calc:atcalc_fft:hf.png?300|:plugins:calc:atcalc_fft:hf.png}} |
^ Heightfield from inverse FFT ^
===== Notes =====
The atCalc_FFT plugin will only work on square heightfields that are a power of two. This is a requirement of the FFT algorithm. If you want to transform heightfields of different sizes, you should look into implementing the general (and really slow) Fourier transform algorithm.
===== Changes =====
====2009/03/26 ====
* Released v2.7.1.0
* Changed function arguments from VarID_maps to VarID_hvars.
* Updated to Zeolite v2.7.1.
====2008/07/1====
* Released v2.5.4.0
* Added menu entries.
* Changed FFT components from re/im to amplitude/phase.
* Moved origin to centre of FFT images.
====2007/05/14====
* Released v2.3.1.0