05622696

download 05622696

of 3

Transcript of 05622696

  • 7/30/2019 05622696

    1/3

    20IO nternational Coerence on Computer Application and System Modeling (CCASM 2010)

    Three-dimensional Ocean Wave Movement Simulation Algorithm Based on Fractal

    X J L L H H F J d X HDepartment of Information Engineering, Department of ComputerShenyang Institute of Engineering, Shenyang ailway Polytechnic

    Shenyang, Chinawinston_xy@63com

    br In recent years, the movement simulation of theocean wave is one of the important researches in the naturesimulation area. And the simulation method based on thefractal principles is relatively common. The paper introducesthe dierent methods to realize the current ocean wavesimulation, describes in detail the random mid-pointdisplacement algorithm according to the fractal Brownianmotion (FBM) in fractal theory, proposes a multi-dynamicnon-uniform interpolation method, makes an effective solutionto the wave jump phenomenon, and uses of the abovementioned methods to achieve a ocean wave of threedimensional dynamic simulation under the C 6 andOpenGL environment. It has the features of being betterrealistic and real-time.

    Krr: : rrp : R p p

    I NTRODUCTION

    The computer simulation of the hypothesized natural

    environment like terrain, plant and the ocean waves has beenone of computer graphics imporant research subjects, theocean waves simulation compares other naturalenvironments to be more complex and dicult SimulationModeling of the current wave is divided into the following

    types: Based on computational uid dynamics method, basedon wave spectral method, based on geomeic modelingmethod and based on the fractal geometry

    The ocean waves regad as the coherent incompressibleow body based on the computation hydromechanicsmethod, although this method can generate realistic wavemotion effects, but because of its solution process is toocomplicated, in practice rarely used in applications The

    basic idea of the Wave spectrum method is to produce one to

    have the same spectrum characteristic high eld with the realsea, and this method suits the uctuation eect of the oceanwaves in the simulation Methods based on geomeic modelof the geometric curve or surface wave sucture changes theshape of a continuous wave form according to thecharacteristics The actal geometry method uses the FBMmethod to produce the actal surface of ocean waves, andthe generate coordinates of points is set to function with thetime and space-related to produce the effect of ocean waves,and with ensuring the continuity of the image byinterpolation metod

    II HORY AND MTHODS BASD ON FRACTAL

    A. Fractal Feature of ocean waveOne of the important features of the actal theory is self

    similarity, and the ocean waves can be regarded as periodic

    waves of different sizes superimposed waveform The waveshave the characteristic of related large-scale and small-scalesimilarity, and the space is respectively to approximate

    homogenei, so the ocean waves have the characteristic ofself-similarity The ocean waves have the actalcharacteristic because of the characteristic of self-similarityWe can use the few data production based on thischaracteristic to have the really third dimension and thetimely ocean waves' uctuation eect

    B mplementaton of fractal surface wavesWe use the random mid-point displacement algorithm

    according to the Fractal Brownian Motion (FBM) in actaltheory to produces the ocean waves' actal surface

    Generally the random mid-point displacement algorithmincludes triangular boundary method, square method,diamond method and diamond - square method This aricleuses diamond square shape law in the following introduction

    s shown in Figure : First step starts a square four spot,the four points , B, C, D have different height values wereh h he hf and calculates the high value of the center point0 then calculate the location and the height of the midpointof each side of quadrilateral according to the value of 4

    Pg2 4

    Figure 1, Diamond - Square method

    So a square can generate four squares in the rst processof subdivision as shown in Figure Symbols in theFigure 1 is the point of the initial square, and symbols is

    the midpoint of the initial square calculated according to the4 initial square points, symbols is the midpoint of thesquare calculated according to the point and the midpoint ofthe initial square, then produce four new squares andcalculate the new height of them So it can generate 16squares in the second process of subdivision and generate 64squares in the third process, and it can generate 22i squaresaer i process Because of the different height of square

    98--4244-23-6$26. O VO-482

  • 7/30/2019 05622696

    2/3

    2010 nternational Coerene on Computer Appliation and System Modeling (CCA 2010)

    points, it can produce an approximate surface aer severalprocesses of iterations, which are close the real ocean waves

    Random functon equatonRandom height is the very imporant nction in the

    process of generating surface waves based on actal tpresent the random number based on the FBM method canbe used Gauss nction (Gauss ) to generate Because itis not exist in the library nction of VC++, need to use theGauss nction according to principles of probabilitymethods In order to improve the simulation speedeffectively, use a simpler random nction equation to

    replace the Gauss nction, the nction is as follows:

    gO (randO%r 1) -r / d ( 1)Parameter d is the actal iterations, function rand is

    the random nction belongs to the library nction of VC++;r is the parameter of the ocean wave height relating to factors

    which affect uctuations of the ocean wave

    III RNCIPLS AND THODS OF AV OTIONIMULATION

    A. Characterstcs f the wave movementCharacteristics of the wave movement are complex and

    mainly in the shape of irregular waves, with complexity andrandomness, many exteal forces in the movement of wavesjust like wind Its movement characteristic may summarizefor superimposition of the approximate periodic regular

    prole superimposition, so the movement pattes of thewave can be seen as a series of rules by the superposition ofwaves with dierent frequency, wave number, and heightand propagation direction, just like simple three-dimensionalmoving wave

    B Wave movement factorsOcean waves caused by many reasons, one of the most

    common movement pattes effects on waves is the windThe main driving force of the ocean wave is the wind Thecharacteristics of the wave movement, including height andspeed, have close contacting with the wind power size In theprocess of using computer simulation of wave movement,many parameters are closely related with the wind elationof wind, wave height and wave period, as shown in the table1 :

    TABL! PARAMETERS OF WAVE OTION IMULAON

    Smalo Wve heht Wve Smulto Smalo m cycless f wv of wvofscle heixhtm cless0 0 0 0 0

    1 0.0-0.15 1 0.125 1

    2 0.15-0.5 1.8 0.25 1.8

    3 0.5-1.25 3.5 0.4 3.5

    4 1.25-2.5 4.7 0.575 4.7

    5 2.5-3.75 5 0.775 5

    6 3.75-4.25 6.5 1 6.5

    7 4.25-6 8.2 1.25 8.2

    8 6-8 10 1.625 10

    Geometrc model of wave motonThe effect of wave generated based on actal is static, in

    order to achieve the uctuating eect of the waves, we set

    off the point for generating high value is a function related totime and space So the movement pattes of the wave canbe seen as a series of rules by the superposition of waveswith dierent equency, wave number, and height and

    propagation direction, just like simple three-dimensionalmoving wave Its sole waveform components form may use(2)to dene:

    x, z, t Asin x t+ I cos z t+ I (2)Parameter named is height of wave, k is the number

    of wave, is equency, is random phase angle, t is thetime variable So the wave surface equation in thecoordinates x y may use (3)to express The wave face on t

    is superimposed by the waves with different equency andheight Now introduce the determination of parameters

    yx t A sinx + cos + (3)

    Parameter is height of wave movement, one of theimportant parameters aecting wave form, determined

    according to the size of the wind level; k is the number ofwave, in ideal status, according to the linear wave theory,

    k parameter g is acceleration of gravity The

    parameterk of wave number is determined by parameter ;

    parameter is a value generated by the random function,

    its utility is random forcing nction and its value range is[2]

    D. Method of multdynamc nonunorm nterpolatonComputer simulation of waves requires large amounts of

    data to achieve, Random numbers generated using thestochastic equation have the properties of unpredictabilityand uncontrollable, it is possible to calculate the wave height

    vary greatly between the two adjacent on time, so effects ofsimulated and real uctuations are quite different n order tomakes an eective solution to the wave jump phenomenon,we propose a multi-dynamic non-uniform interpolationmethod, and the concrete method is as follows:

    First, determine the coordinate in time of point p basedon random mid-point displacement algorithm In the rst

    process of subdivision, the coordinates of the midpoint 0 ofthe square may use (4) to dene and midpoint E on the side

    A can use 5to dene:

    VO-483

  • 7/30/2019 05622696

    3/3

    2010 nternational Coerence on Computer Application and System Modeling (CCA 2010)

    S x,y,z,t l )S + +SB + S + SD )

    S + gu ess4

    yztJ A+yztJ B+yztJ 0yztJ /. +gS

    3

    (4)

    5

    We can generate different wave height at different times,and effects of wave movement to generate the changes over

    time Then set the coorinates of point P on two adjacenttime moments is x,y,z,t and (xyzt2) , and threeparameters dene the name for the , nparameter named dis the difference in height of point P between t1 andtz ' isDegree of uniformity, and n is the numberinterpolation point, n=Int So thex,y, may use (6) to express:

    of dynamiccoordinates

    x, y,z,t = x,y,z,tl +(t - tJ ) ( x,y, Z,t2 x, y, Z,tl (6)t2 tlWhen n = , it is can reach the conclusion that

    x,y,,tn x,y,,tz , that is to say not need to addinterpolation points; when n > 0 add one or more pointsaccording to parameter d. This method can effectively reducethe image discontinuity caused by the properties ofunpredictability and uncontrollable nature of random

    numbers in order to improve the results of simulation

    IV IMULATION ALGORTHM OF AVE OTIONIn order do simulate the eect of surface movement; we

    must set the function of wave height to relate time, so we canproduce the movement results along with the time variationThe realization process is as follows:

    1) Calculate the point coordinates x, y, of actalsurface generation;

    2) Set the coordinates for the nction relate time as (7)wave height Y changes with time;

    Yix,,t Aisn (kix - t+ s (ki - t+ i (7)3) Based on the input value of wind power, nd the

    simulation of wave height and the cycle in Table 1,then calculate = 1 / , k = / g and ' ;

    4) Calculate the value of parameter d which 1S theerence in heght of pon P between tl an tz ; thencalculate the number P of dynamic interpolation point,

    P = Intd I);5 Use (6) in 34 to calculate the coordinate of

    interpolation points, and P P - 1

    6) Repeat step 5 until P = dynamic interpolation is toend;

    7) By using the function named Set Pixel Format inOpenGL, Set the display format is double-buffering mode,

    and use Swap Buers to exchange images in buffer to drawwave motion image

    Based on the above algorithm, using VC++60 and

    OpenGL to simulate three-dimensional wave movement onP

    V ONCLUSIONS

    The ocean waves have the actal characteristic byanalyzing the wave of specic form, and it can be regardedas periodic waves of dirent sizes superimposed waveform,also the waves have the characteristic of related large-scaleand small-scale similarity The paper describes in detail therandom mid-point displacement algorithm according to theactal Brownian motion (FBM) in actal theory In order tomake an eective solution to the wave jump phenomenon,

    proposes a multi-dynamic non-uniform interpolation method,which can eectively reduce the wave jump phenomenon

    FERNCE

    [] Chu Yan-jun Kang Feng-ju,"Fractal-based Ocean Wave Model forVisual Simulation Joual of SystemSimulation2006 vo s2pp.391-393

    [2] Du YanZhang Xiaou LI Wen_xiu "Computerized Simulation ofOcean Wave Forms in VR Secnes Joual of Harbin EngineeringUniversity 200 1 vo22pp. 26-29.

    [3] Xie Wei Guo QishengDong Zhiming "Real-time Visual Simulationof Ocean Wave Computer Engineering andApplications2001vo20pp.123-25.

    [4] Peng GengZhang Li-minAi Zu-liangDeng Xiang-yang"Real-timeSimulation of Three-dimensional Multi-resolution Ocean WaveBased on Fractal Computer Engineering andApplications2006 vo.33pp.-15.

    [5] Liang Jun Jiang Jin-longZhao Xue-lianCheng Guo-youChen Jinbo The applicability analysis of MPD method in 3D terraininterpolation Science of Surveying and Mapping2007vo.32pp.44-46.

    [6] Zeng Fantao Real-time Wave Simulation Based on Texturemapping Microcomputer Applications2007 vo.28pp. 1029-1033.

    VO-484