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。