2012-02-12 15 views
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で動かなくなってしまいます。

答えて

1

2D平面波方程式は、1Dの場合のスカラー座標の代わりに座標ベクトルを使用する解析解を有する。

溶液は、an equation on this pageで与えられ、下線はベクトルを示す。

関連する問題