// Variables to store wave parameters double amplitude = 1.0; // Wave amplitude (A) double wavelength = 2.0; // Wavelength of the wave (ă) double period = 1.0; // Period of the wave (T) // Configuration variables for the graph range, number of points, and time increment const int N = 100; // Number of grid points per axis (higher = smoother mesh) const double X_MIN = -5.0; // Minimum value on the X-axis const double X_MAX = 5.0; // Maximum value on the X-axis const double Y_MIN = -5.0; // Minimum value on the Y-axis const double Y_MAX = 5.0; // Maximum value on the Y-axis const double Z_MIN = -1.0; // Minimum value on the Z-axis const double Z_MAX = 1.0; // Maximum value on the Z-axis const double DT = 0.1; // Time increment per loop iteration (when speed = 1.0) const double DX = (X_MAX - X_MIN) / (N-1); // Mesh interval along the X-axis const double DY = (Y_MAX - Y_MIN) / (N-1); // Mesh interval along the Y-axis // Coordinate arrays to pass wave data to the graph double waveX[ N ][ N ]; // X-coordinate array double waveY[ N ][ N ]; // Y-coordinate array double waveZ[ N ][ N ]; // Z-coordinate array