Realistic Simulation of Ocean Surface Using Wave Spectra Jocelyn Fréchot
Total Page:16
File Type:pdf, Size:1020Kb
Realistic simulation of ocean surface using wave spectra Jocelyn Fréchot To cite this version: Jocelyn Fréchot. Realistic simulation of ocean surface using wave spectra. Proceedings of the First International Conference on Computer Graphics Theory and Applications (GRAPP 2006), 2006, Por- tugal. pp.76–83. hal-00307938 HAL Id: hal-00307938 https://hal.archives-ouvertes.fr/hal-00307938 Submitted on 29 Jul 2008 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. REALISTIC SIMULATION OF OCEAN SURFACE USING WAVE SPECTRA Jocelyn Frechot´ LaBRI - Laboratoire bordelais de recherche en informatique Domaine universitaire, 351 cours de la Liber´ ation, 33405 Talence CEDEX, France [email protected] Keywords: Natural phenomena, realistic ocean waves, procedural animation, parametric energy spectra Abstract: We present a method to simulate ocean surfaces away from the coast, with correct statistical wave height and direction distributions. By using classical oceanographic parametric wave spectra, our results fit real world measurements, without depending on them. Since wave spectra are independent of the ocean model, Gerstner parametric equations and Fourier transform method can be used with them. Moreover, since they are simple to use and need very few parameters, they allow easy production of ocean surface animations usable in movies and games. We explain how to accurately sample them, to achieve oceanic waves in deep water according to given wind parameters, in a realistic way. 1 INTRODUCTION face statistics are taken in account by the use of para- metric wave spectra. For given wind parameters, they The reproductions of many natural phenomena is still indicate the distribution of wave energy as a function an open problem in Computer Graphics. In particular, of frequency. However, none of the existing methods the realistic simulation of oceanic surfaces continues are able to correctly reproduce sea states described by to be of great interest. Many fields of activity rely on these spectra. it: virtual reality, movies and games, but also sailing In this paper, we explain how wave spectra are (Cieutat et al., 2001) and oceanographic simulations, related to oceanic surface energy and we detail a among others. method to deduce wave heights from it. We propose While beautiful pictures and animations such as a solution for optimal spectrum sampling, suitable wave refraction (Gonzato and le Saec,¨ 2000) (Gamito for parametric and Fourier transform models. This and Musgrave, 2002) are produced, there is still a method enables the accurate simulation of oceanic need for oceanic scenes with realistic wave features. surface. Users can easily produce realistic wave ani- Models based on fluid mechanics equations (Enright mations, with respect to supplied weather conditions. et al., 2002) (Mihalef et al., 2004) should give the The structure of this paper is as follows. Section 2 more realistic results, but are inadequate for large summarizes ocean models for Computer Graphics. oceanic surfaces. In section 3, we detail our method and give classi- For twenty years, procedural models for wave rep- cal parametric spectrum examples. We handle wave resentation in Computer Graphics have been devel- statistics in section 4. We discuss our results in sec- oped and improved (Iglesias, 2004). The Gerst- tion 5, and conclude in section 6. ner parametric equations and their Fourier transform rewriting are well known by the oceanographic com- munity. Based on the linear wave theory, they allow 2 OCEAN MODELS representation of natural wave shapes and moves in deep water above the capillary size. As they not de- scribe any net mass transport, they are limited to non- 2.1 Definitions and relationships breaking waves and to scenes without violent storms. Wave height measurement data allow to simulate a The surface elevation, η, is the vertical displacement given sea state. In the more general case, oceanic sur- from the mean water level of the oceanic surface at given point and time. The wave amplitude, a, is the (Airy, 1845), widely used in oceanic engineering, and maximum surface elevation due to this wave. The in Computer Graphics by (Peachey, 1986). It de- wave height, H, is the vertical distance between a scribes waves with a sinusoidal shape, which corre- trough and an adjacent crest. For a single wave, sponds to calm weather conditions. Considering a lo- H = 2a. The wavelength, λ, is the distance between cation x0 lying on a 1D surface at rest, the elevation two successive crests. The period, T , is the time inter- z = η at time t due to a wave with wavenumber κ, val between the passage of successive crests through amplitude a and angular velocity ! = pgκ is frequency f = 1=T a fixed point. The , , is the number z(x ; t) = a cos(κx !t): (2) of crests that pass a fixed point in 1 second. The wave 0 0 − speed or phase speed, c = λ/T , is the speed of wave When the steepness of the wave increases, its crests crests or troughs. It can also be expressed as c = !/κ, become sharper and its troughs flatter. Therefore, where ! = 2πf is the angular velocity or angular fre- (Fournier and Reeves, 1986) used a more realistic de- quency, and κ = 2π/λ is the wavenumber. The water scription based on trochoids, made by (von Gerstner, depth, d, is the vertical distance between the floor and 1804) and by (Rankine, 1863). The surface equation the mean water level. is now The concept of deep water is wave dependent and x(x0; t) = x0 + a sin(κx0 !t) − (3) is related to the ratio of the water depth to the wave- z(x ; t) = z a cos(κx !t); length of the wave. This comes from the transcenden- 0 0 − 0 − tal expression where z0 is the surface elevation at rest (typically 0). gT 2 2πd Note that the important point here is the phase term λ = tanh ; (1) difference of π=2 between x(x0; t) and z(x0; t), not 2π λ − the use of a particular sine or cosine function. This 2 where g 9:807 m s− is the standard acceleration Lagrangian model describes the trajectory in a ver- of gravity≈. Since tanh· (x) 1 when x > π, and tical plane of a particle (x; z) around its position at ≈ tanh(x) x when x < π=10, water is considered rest (x0; z0). Summing several waves and extending deep if d/λ≈ > 1=2 and shallow if d/λ > 1=20. This equation 3 to a 2D surface gives leads to some simplifications in the expressions of the ~x(~x0; t) = terms given above (see table 1). ~x + ~κ^ a(~κ) sin(~κ ~x !(κ)t + φ(~κ)) 8 0 · 0 − > ~κ > X Table 1: Relations between oceanographic terms. The sub- > z(~x ; t) = script indicates a deep water term. > 0 1 < z0 a(~κ) cos(~κ ~x0 !(κ)t + φ(~κ)); > − · − Transitional depth: Deep water: > ~κ > X (4) 1=20 < d/λ < 1=2 d/λ > 1=2 > : ~x = (x; y) λ ! where is the horizontal particle position at c = T = κ time t, ~x0 = (x0; y0) its position at rest, ~κ = (κx; κy) c = gT tanh(κd) c = gT a wave vector, i.e. a vector with magnitude ~κ = 2π 1 2π k k 2 g 2 g g 2 κ and direction of the considered wave propagation c = κ tanh(κd) c = κ = ( ! ) 1 and ~κ^ = ~κ/ ~κ is the unit vector of ~κ. Because of k k κ = 2π the presence of uniformly distributed random phase λ terms, φ(~κ) [0; 2π[, this model is also known as κ = κ tanh(κd) 2 1 random waves. Any set of ~x0 can be taken, which 2π allows the use of adaptive mesh, for optimal surface λ = κ = cT 2 2 sampling (Hinsinger et al., 2002). λ = gT tanh( 2πd ) λ = gT 2π λ 1 2π λ = λ tanh(κd) 2.3 Inverse Fourier transform 1 2π Another method for computing equation 4 is the 2D ! = T = κc !2 = gκ tanh(κd) = gκ !2 = gκ inverse discrete Fourier transform, used by (Mastin 1 1 et al., 1987), (Premozeˇ and Ashikhmin, 2001) and (Tessendorf, 2001). The set of N M complex num- × bers Fn;m is transformed into a set of complex num- 2.2 Parametric equations bers fp;q by N M np mq The base model for ocean waves simulation comes f = F exp i2π + ; (5) p;q n;m N M from the linear (or small-amplitude) wave theory by n=1 m=1 X X where p 1; ::; N and q 1; ::; M . This is natural method is to use records of surface elevation of particular2 finterest gbecause the2 ffast Fourierg trans- measurement data used by oceanic engineering (Thon form (FFT) algorithm is an efficient way to compute and Ghazanfarpour, 2002). Measurements are made these sum. However, in comparison with the previous with accelerometers mounted on buoys, satellite al- method, its usage is more restrictive. The set of ~x0 is timeters, high frequency radars and others techniques. defined as a regular grid of N M points with dimen- A spectral analysis of the collected data is done using × sions Lx Ly and origin at the center, such that ~x0 = the Fourier transform from time domain to frequency (n L =N×; m L =M), where n [ N=2; N=2[ domain.