# Gerstner 算法来源

本版改编了 Sean Bradley 的 Three.js Gerstner Ocean 示例中的波浪公式，并为照片投影与船体三点采样编写了接入逻辑。

- [原始示例源码，固定提交](https://github.com/Sean-Bradley/three.js/blob/13218bbabc60d8d4ad51e46f36d900aad3ec41ae/examples/webgl_shaders_ocean_gerstner.html)
- [作者的 Gerstner Water 页面](https://sbcode.net/threejs/gerstnerwater/)
- [NVIDIA GPU Gems：Effective Water Simulation from Physical Models](https://developer.nvidia.com/gpugems/gpugems/part-i-natural-effects/chapter-1-effective-water-simulation-physical-models)

每组波使用：

```text
k = 2π / wavelength
c = sqrt(g / k)
phase = k × (direction · position - c × time)
amplitude = steepness / k

horizontal displacement = direction × amplitude × cos(phase)
height = amplitude × sin(phase)
```

四组波的位移求和；相同参数同时送入 GPU 着色器与 CPU 船体运动计算。参考示例使用 MIT 许可证，完整文本保留在 `vendor/Gerstner-LICENSE.txt`，也内嵌在生成的 HTML 中。Three.js 0.160.0 的许可证另存为 `vendor/THREE-LICENSE.txt`。

本次借用的是公式与实现思路；此目录中的页面已适配现有照片动效，不是原始示例的整页复制。
