1 / 22

使用波動方程式的擬真和互動式水面模擬

使用波動方程式的擬真和互動式水面模擬. 496410032 吳金龍 Advisor: Damon Shing -Min Liu. Introduction. What can fluid simulation do for us? What is the difficulty of the topic?. Objective. Real-time and visual quality Interact with users. Height Field. h.

vala
Download Presentation

使用波動方程式的擬真和互動式水面模擬

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 使用波動方程式的擬真和互動式水面模擬 496410032 吳金龍 Advisor: Damon Shing-Min Liu

  2. Introduction • What can fluid simulation do for us? • What is the difficulty of the topic?

  3. Objective • Real-time and visual quality • Interact with users

  4. Height Field h present water surface as a 2D function h(x,y) 2D array h[i,j] y x h j i

  5. Height Field • Pros: Process from 3D to 2D reduce computational time • Cons: One location (x,y) maps to exactly one height no breaking waves

  6. Hello World!

  7. Algorithm • Use 2 arrays A[N][M] , B[N][M] of the same size • Initialize A[i][j] with arbitrary values • Initialize B[i][j] with 0 • loop forall i,j do B[i,j] += (A[i-1,j] + A[i+1,j] + A[i,j-1] + A[i,j+1])/4- A[i,j]; forall i,j do B[i,j] *= 0.99; forall i,j do A[i,j] += B[i,j]; endloop

  8. Algorithm • It simulate the wave propagation phenomenon travel direction

  9. Pros and Cons • Pros: 1). Simple 2). Computational time is independentof wave source • Cons: 1). Unnatural shape of wave propagation 2). Slow wave propagation demo

  10. Addition of Sine Waves

  11. Governing Equation • h : height of water surface A : amplitude ω : angular velocity t : time φ : phase λ : wave length f : frequency

  12. Algorithm • summate all sine waves • v = λ x f is a constant , and λ increases with t • Phase increases constantly to animate wave propagation

  13. Pros and Cons • Pros: Better look of shape of wave propagation • Cons: Computational time is proportional to wave source number demo

  14. Wave Equation

  15. Governing Equation h: height of water surface t: time c: velocity x: position of x direction y: position of y direction

  16. Damping • With damping • Where k is damping factor

  17. Finite Difference Where h is a insignificant and non-zero value

  18. Discrete Wave Equation

  19. Discrete Wave Equation

  20. stability • How to choose ? • Courant-Friedrichs-Lewy stability condition holds which says that information must not travel more than one grid cell per time step, i.e. c t < x

  21. Result • CPU : AMD Athlon™3500+2.2GHZ • Graphics Card: Radeon HD 3650 • RAM : 1G • About 60 fps in grid size of 360 x 360 • demo 1demo 2

  22. END • Thanks for listening.

More Related