私はこれを理解するために長い間努力してきましたが、何もうまくいかないようです。
私は基本的に任意の速度で進行波を作ろうとしています。
一般的に、私が使用しようとしているのは、平面波動方程式を含むものです。これは、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でスタックします。