POV-Ray : Newsgroups : povray.binaries.animations : Liquid animation : Re: Liquid animation Server Time
19 Jul 2024 06:14:57 EDT (-0400)
  Re: Liquid animation  
From: Christoph Hormann
Date: 13 Nov 2003 04:42:01
Message: <ktvb81-2i7.ln1@triton.imagico.de>
Claudio Pozzoli wrote:
>>It looks very good.  If you wrote the simulation engine yourself i guess
>>a lot of people here would be interested in it.
> 
> 
> The simulation is based over Smoothed Particles Hydrodynamics, a
> pure lagrangian method introduced in late '70 by Gingold and
> Monaghan and originally used to model compressible flows in
> astrophysical simulations. Successively it has been adapted to the
> simulation of quasi-incompressible - incompressible flows.
> The liquid is approximated by a finite number of particles, each carrying
> physical informations like density, pressure, speed, viscosity...
> [...]

Thanks for the explanation, i was more referring to the actual program 
though.  The nice thing about particle based fluid simulation is that 
the fluid can move in large areas without excessive memory requirements 
that would occur with grid based methods.  It could even be worth 
considering integrating such a system into POV since for interaction 
with the environment you could rely on the raytracing functions.

>>Note that you don't need to generate a mesh from the scalar field,
>>POV-Ray can directly render isosurfaces.  I did renders of fluid
>>simulations before by generating a density file from the simulation data
>>and using it in an isosurface.
> 
> 
> How could I do this? I mean: once I've generated a density file, following
> the examples in pov documentation, I have to use it as a pattern (media,
> pigment-normal) and associate it with a primitive. Do you use an isosurface
> as object? densityfile as a media pattern? I would like to test it out! : )

You can use the density file in an isosurface shape just like any other 
pattern:

#declare Fn_Density=
   function { pattern { density_file df3 "file" interpolate 2 } }

isosurface {
   function { Fn_Density(x, y, z) - 0.5 }
   ...
}

This will show the isosurface with density=0.5.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.