Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I don't understand the equation37 in simulate ocean water by Jerry Tessendorf.The result is all complex number, how to be the slope.Even if I compute the magnitude of it,the result is just positive which is obvious wrong.As There must be some points whose slope is negative.Who can help me.Thank you.

http://www-evasion.imag.fr/Membres/Fabrice.Neyret/NaturalScenes/fluids/water/waves/fluids-nuages/waves/Jonathan/articlesCG/simulating-ocean-water-01.pdf

share|improve this question
    
Equation 37 is inverse fourier transform and ik*h~(k,t) does not preserve the complex conjugation property.So the result of the inverse fourier transform is a complex.Am I wrong? –  user1859053 Nov 28 '12 at 13:19
1  
Check the magnitude of the imaginary parts of the inverse Fourier transform that you computed. If these are very small (order of machine error), they come from roundoff and can be ignored. That is, just proceed with the real parts. –  Hans Engler Nov 28 '12 at 13:26
    
Do you mean that they should be small?But I found that they are not small enough compare to the real part. –  user1859053 Nov 28 '12 at 13:29

1 Answer 1

If $h(x)$ is a real valued function we have that since $h(x) = \bar{h}(x)$ that its Fourier series

$$ h(x) \approx \sum \tilde{h}(k) \exp ikx = \sum \bar{\tilde{h}}(k) \exp -ikx \approx \bar{h}(x)$$

So $\tilde{h}(k) = \bar{\tilde{h}}(-k)$. This is a fundamental property of the Fourier transform of real valued functions.

Now if we write

$$ \nabla h(x) \approx \sum i k \tilde{h}(k) \exp ikx = \sum \eta(k) \exp ikx $$

we note that

$$ \bar\eta(k) = \eta(-k) $$

by a direct computation. And hence

$$ \nabla h(x) = \overline{\nabla h}(x) $$

is a real valued function.

share|improve this answer
    
If you are doing this numerically and you find that the imaginary component of the Fourier series is large, that means you are either making a mistake or you are running into problems with discretisations (too much error). If you are worried about imaginary numbers, you can just take the real-valued representation $$ h(x) \approx \sum h_c(k) \cos kx + h_s(k) \sin kx $$ using the Fourier sine and cosine series. You will have that the derivative is $$ \nabla h(x) \approx \sum k h_s(k) \cos kx - k h_c(k) \sin kx $$ which is manifestly real-valued. –  Willie Wong Nov 28 '12 at 13:38
    
From your equation is very clear and right.But I still have one question.The K is a vector, so equation 37 should be computed twice:kx and ky.K = (kx, ky).Then ikxh~(k) does not preserve the conjugation preperty. –  user1859053 Nov 28 '12 at 13:41
    
$k$ is a real-valued vector, so $\bar{ik} = -ik$. Hence $\overline{ik h(k,t)} = -i k \overline{h(k,t)} = -ik h(-k,t) = i(-k) h(-k,t)$ with no problem. –  Willie Wong Nov 28 '12 at 13:43
    
In other words, what I wrote above carries through exactly in the case $x\in\mathbb{R}^n$ or $x\in \mathbb{T}^n$, if $kx$ is interpreted to mean the dot product and $\nabla$ is the gradient operator. Both sides of the equation for $\nabla h$ becomes now vector valued. –  Willie Wong Nov 28 '12 at 13:45
    
We get a slope vector by computing the equation 37.So I compute the inverse fourier transform twice,first I substitute the iK(just the first one) with ikx, second with ikz.The result is the component of the slope vector.Am I wrong? –  user1859053 Nov 28 '12 at 13:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.