0

我一直在努力解决这个问题,但似乎没有任何效果。

我基本上是在尝试以任意速度制作行波。

一般来说,我一直在尝试使用的是涉及平面波方程的东西,当你有 aVector velocity和 a时,它就像这样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);

在一维中测试,这当然有效。在哪里

float x = speed

float y = amplitude * cos((waveNumber * position.x) - (omega * time))

这对我来说很有意义。但是对于 2 维,我被困在 psi 上。

4

1 回答 1

1

二维平面波方程具有使用坐标矢量代替一维情况下的标量坐标的解析解。

解决方案由本页上的一个方程给出,其中下划线表示一个向量。

于 2012-02-12T01:46:49.177 回答