Matlab/CUDA: ocean wave simulation
I've studied "Simulating Ocean Water" article by Jerry Tessendorf and tried to program the Statistical Wave Model but I didn't get correct result and I don't understand why. In my program I tried only to create a wave height field at time t = 0 without any further changes in time. After execution of my program I got not what I was expecting: Here's my source code: clear all; close all; clc; rng(11); % setting seed for random numbers meshSize = 64; % field size windDir = [1, 0]; % ||windDir|| = 1 patchSize = 64; A = 1e+4; g = 9.81; % gravitational constant windSpeed = 1e+2; x1 = linspace(-10,