• Nenhum resultado encontrado

Neste capítulo serão apresentados e discutidos os resultados da implementação do sistema de partículas proposto.

A figura 39 ilustra algumas cenas durante a simulação. Utilizando o método de busca de vizinhança mais eficiente (Grid com otimização, seção 6.2 na página 66), a simulação ocorre a uma média de 25 quadros por segundo. Como o intervalo de tempo utilizado na simulação é de 0,01 segundos, e cada quadro leva 251 = 0, 04 segundos para ser processado, o resultado é que o fluido parece estar se movendo a uma velocidade quatro vezes menor que a normal. Isto é longe de ser uma simulação em tempo real, de forma que otimizações consideráveis de métodos e código teriam que ser feitas antes de se obter uma simulação totalmente realista.

7.1

Busca de Vizinhança

A tabela 1 compara todos os métodos de busca de vizinhança discutidos no capítulo 6.

7.2

Conclusões

O método SPH, em teoria, simula líquidos corretamente. A observação feita é que o método é pesado e possui um custo computacional alto, de forma que não foi possível simular líquidos em tempo real. Medidas que poderiam ser tomadas incluem:

• Utilização de hardware mais poderoso.

No de Iterações Com Grid, Otim. Com Grid, Não Otim. Força Bruta, Otim. Força Bruta, Não Otim. 10 20 31 84 167 20 25 39 88 166 30 23 36 83 160 40 19 23 80 159 50 20 32 85 160 60 24 29 80 161 70 26 31 82 157 80 22 32 79 161 90 20 31 83 162 100 22 30 82 164 Média 22,1 31,4 82,6 161,7

Tabela 1: Comparação entre os diferentes métodos de busca de vizinhança. Os valores na coluna indicam o número de ciclos que cada método leva em média no processador, dividido por mil. O método com Grid e otimização é em média quase oito vezes mais eficiente que o pior de todos, o método Força Bruta sem otimização.

todo mais eficiente que o Grid poderia ser concebido para a busca de vizinhança, ou o procedimento para detecção de colisão poderia ser mais inteligente.

• Otimizações em nível de código e hardware. Características da plataforma utilizada (compilador, sistema operacional, processador) poderiam ser exploradas para a geração de código mais eficiente, sacrificando portabilidade.

Referências

AMADA, T.; IMURA, M.; YASUMURO, Y.; MANABE, Y.; CHIHARA, K. Particle-based fluid simulation on gpu. ACM Workshop on General-Purpose Computing on Graphics Processors and SIGGRAPH 2004 Poster Session, 2004.

ATKINS, P. W. Fisico-Quimica. 6. ed. [S.l.]: LTC, 1999.

BRIDSON, Robert; MULLER-FISCHER, Matthias; GUENDELMAN, Eran. Fluid simulation. In: SIGGRAPH 2006 Course Notes. [S.l.: s.n.], 2006.

DESBRUN, Mathieu; GASCUEL, Marie-Paule. Smoothed particles: a new paradigm for animating highly deformable bodies. In: Proceedings of the Eurographics workshop on Computer animation and simulation ’96. New York, NY, USA: Springer-Verlag New York, Inc., 1996. p. 61–76. ISBN 3-211-82885-0.

FOSTER, Nick; FEDKIW, Ronald. Practical animation of liquids. In: SIGGRAPH ’01: Proceedings of the 28th annual conference on Computer graphics and interactive techniques. New York, NY, USA: ACM Press, 2001. p. 23–30. ISBN 1-58113-374-X.

FOSTER, Nick; METAXAS, Dimitri. Realistic animation of liquids. Graphical mo- dels and image processing: GMIP, v. 58, n. 5, p. 471–483, 1996. Disponível em: <citeseer.ist.psu.edu/foster95realistic.html>.

GINGOLD, R.A.; MONAGHAN, J.J. Smoothed particle hydrodynamics - theory and application to non-spherical stars. mnras, v. 181, p. 375–389, nov. 1977.

HARLOW, F. H.; WELCH, J. E. Numerical calculation of time-dependent viscous

incompressible flow of fluid with free surface. In: The Physics of Fluids. [S.l.: s.n.], 1965. p. 2182–2189.

HECKER, Chris. Collision response. Game Developer Magazine, June 1997. HUT, Piet; MAKINO, Jun. The art of computer science.

JAILLET, F.; SHARIAT, B.; VANDORPE, D. Deformable volume object mode- ling with a particle-based system for medical applications. 1997. Disponível em: <citeseer.ist.psu.edu/jaillet97deformable.html>.

KASS, Michael; MILLER, Gavin. Rapid, stable fluid dynamics for computer graphics. In: SIGGRAPH ’90: Proceedings of the 17th annual conference on Computer graphics and interactive techniques. New York, NY, USA: ACM Press, 1990. p. 49–57. ISBN 0-201-50933-4.

KELAGER, Micky. Lagrangian fluid dynamics using smoothed particle hydrodynamics. What. January 2006. Disponível em: <www.opentissue.org>.

KOSHIZUKA, Seiichi; NOBE, Atsushi; OKA, Yoshiaki. Numerical analysis of breaking waves using the moving particle semi-implicit method. International Journal for Numerical Methods in Fluids, v. 26, p. 751–769, 1998.

LOSASSO, Frank; GIBOU, Frederic; FEDKIW, Ron. Simulating water and smoke with an octree data structure. ACM Trans. Graph., ACM Press, New York, NY, USA, v. 23, n. 3, p. 457–462, 2004. ISSN 0730-0301.

LUCY, Leon B. A numerical approach to testing the fission hypothesis. v. 82, n. 12, p. 1013–1924, dez. 1977.

MOLLER ERIC HAINES, Tomas Akenine-Moller Tomas. Real-Time Rendering. 2Âa. ed.

[S.l.]: AK Peters, Ltd., 2002.

MONAGHAN, J.J. Smoothed particle hydrodynamics. Annual Review of Astronomy and Astrophysics, p. 543–574, 1992.

MORRIS, J. P. Simulating surface tension with smoothed particle hydrodynamics. International Journal for Numerical Methods in Fluids, v. 33, p. 333–353, jun. 2000.

M.S.CRAMER. Navier-Stokes Equations - Incompressible Flows. 2002. Disponível em: <http://www.navier-stokes.net/nsinc.htm>.

MUELLER, Matthias; SCHIRM, Simon; TESCHNER, Matthias; HEIDELBERGER, Bruno; GROSS, Markus. Interaction of Fluids with Deformable Solids. 2004. Disponível em: <citeseer.ist.psu.edu/mueller04interaction.html>.

MULLER, Matthias; CHARYPAR, David; GROSS, Markus. Particle-based fluid simulation for interactive applications. In: SCA ’03: Proceedings of the 2003 ACM SIGGRAPH/Eurographics symposium on Computer animation. Aire-la-Ville, Switzerland, Switzerland: Eurographics Association, 2003. p. 154–159. ISBN 1-58113-659-5.

MULLER, Matthias; SCHIRM, Simon; TESCHNER, Matthias. Interactive blood simulation for virtual surgery based on smoothed particle hydrodynamics. Technol. Health Care, IOS Press, Amsterdam, The Netherlands, The Netherlands, v. 12, n. 1, p. 25–31, 2004. ISSN 0928-7329.

PREMOZE, S.; TASDIZEN, T.; BIGLER, J.; LEFOHN, A.; WHITAKER, R. Particle-based si- mulation of fluids. 2003. Disponível em: <citeseer.ist.psu.edu/premoze03particlebased.html>. REEVES, W. T. Particle systems: a technique for modeling a class of fuzzy objects. ACM Trans. Graph., ACM Press, New York, NY, USA, v. 2, n. 2, p. 91–108, 1983. ISSN 0730-0301. STAM, Jos. Stable fluids. In: SIGGRAPH ’99: Proceedings of the 26th annual conference on Computer graphics and interactive techniques. New York, NY, USA: ACM Press/Addison- Wesley Publishing Co., 1999. p. 121–128. ISBN 0-201-48560-5.

STAM, Jos. Interacting with smoke and fire in real time. Commun. ACM, ACM Press, New York, NY, USA, v. 43, n. 7, p. 76–83, 2000. ISSN 0001-0782.

STAM, J. Real-time fluid dynamics for games. 2003. Disponível em: <citeseer.ist.psu.edu/stam03realtime.html>.

WEISSTEIN, Eric W. Plane. MathWorld–A Wolfram Web Resource., 2002. Disponível em: <http://mathworld.wolfram.com/Plane.html>.

WEISSTEIN, Eric W. Point-plane distance. MathWorld–A Wolfram Web Resource., 2003. Disponível em: <http://mathworld.wolfram.com/Point-PlaneDistance.html>.

WRENNINGE, Magnus. Fluid Simulation for Visual Effects. Dissertação (Mestrado) — Linköping University, Linköpings universitet 581 83 LINKÖPING, Sweden, 2003.

Documentos relacionados