POV-Ray : Newsgroups : povray.binaries.images : Filling a bottle with fluid : Re: Filling a bottle with fluid Server Time
30 Jul 2024 06:24:50 EDT (-0400)
  Re: Filling a bottle with fluid  
From: Thomas de Groot
Date: 22 Aug 2012 07:29:17
Message: <5034c28d$1@news.povray.org>
On 22-8-2012 12:15, Le_Forgeron wrote:
>
> I'm sure I can correct it, with a different approach.
> can you provide the scene file, please ?
>
>
I'll be delighted :-)

Note that I only tried to see what happened in case the fluid 
intersected the bottle thickness. I have not tried your previous 
suggestions.

The only important code used is this. I experimented by switching on or 
off the different hollow terms. Only with the fluid scale commented out 
is the scene /realistic/.

//start code
union {
//bottle:
difference {
   box {-1, 1 hollow}
   box {-0.8, <0.8, 1.1, 0.8> hollow}
   material {
     texture {pigment {rgbt 1}}
     interior {
       ior 1.5
       media {samples 100 scattering {1, srgb <0, 1, 1>*0.5}}
     }
   }
}

//fluid:
box {
   -0.799, <0.799, 0.5, 0.799> scale 1.1
   hollow
   material {
     texture {pigment {rgbt 1}}
     interior {
       ior 1.3
       media {samples 100 scattering {1, srgb <1,0,0>}}
     }
   }
}

rotate 35*y
}
//end code

Thomas


Post a reply to this message

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