0
私はこれを理解するのに最も長い時間をかけてきましたが、何も動作していないようです。角度で移動する波
私は基本的に任意の速度で進行波を作りようとしています。
私はあなたがVector velocity
を持っているとき、何かがこのように書き平面波方程式を伴うれる使用しようとしてきたものを一般に
とPoint position
:
float pi2 = 2 * PI;
// For our purposes lambda is the speed
float lambda = velocity.length();
// Therefore frequency is 1
float frequency = 1.0F;
// Making angular frequency equal to 2 * PI
float omega = pi2;
// Lambda is the wavelength and pi2/lambda is the wave number
Vector waveVector = velocity.norm().multiply(pi2/lambda);
// Theta is the angle from the origin to the new position at time
float theta = waveVector.dot(position.toVector()) - (omega * time);
// Here's where I'm stuck. Psi is equal to the current disturbance of the wave.
// Where do I go from here to get the new coordinates?
float psi = amplitude * cos(theta);
は1次元でテストされ、これは当然のことながら作品。どこ
float x = speed
と
float y = amplitude * cos((waveNumber * position.x) - (omega * time))
くらいは私には理にかなっていること。しかし、2次元では私はpsiで動かなくなってしまいます。