POV-Ray : Newsgroups : povray.general : filling a bottle with fluid Server Time
1 Nov 2024 11:15:21 EDT (-0400)
  filling a bottle with fluid (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: joe
Subject: filling a bottle with fluid
Date: 19 Aug 2012 22:55:00
Message: <web.5031a6586f2d14c8ad797add0@news.povray.org>
I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
hollow and has a wall thickness.  To fill the bottle with soda I am creating
another lathe object inside the bottle.  To prevent a coincident surface problem
should I scale the soda larger to push the soda into the bottle wall?  Any
better ways to fill a bottle with fluid?


Post a reply to this message

From: jhu
Subject: Re: filling a bottle with fluid
Date: 19 Aug 2012 23:45:01
Message: <web.5031b29cda492adad19b0ec40@news.povray.org>
"joe" <nomail@nomail> wrote:
> I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
> hollow and has a wall thickness.  To fill the bottle with soda I am creating
> another lathe object inside the bottle.  To prevent a coincident surface problem
> should I scale the soda larger to push the soda into the bottle wall?  Any
> better ways to fill a bottle with fluid?

Here's what I usually do with such things. Make a lathe, subtract a slightly
smaller lathe to create a hollow object, then place a slightly smaller lathe
(just smaller than the difference) inside with appropriate media definitions. In
all, you should have 3 of the same lathes, just different sizes.


Post a reply to this message

From: Le Forgeron
Subject: Re: filling a bottle with fluid
Date: 20 Aug 2012 02:37:45
Message: <5031db39$1@news.povray.org>
Le 20/08/2012 04:52, joe a écrit :
> I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
> hollow and has a wall thickness.  To fill the bottle with soda I am creating
> another lathe object inside the bottle.  To prevent a coincident surface problem
> should I scale the soda larger to push the soda into the bottle wall?  Any
> better ways to fill a bottle with fluid?
> 
> 

Vicious: no wall thickness, not hollow (per english, hollow keyword is
allowed, even recommended, and setting interior also ) :
 # plain block of glass in which you put a block of liquid and finally
you use a difference with a third block to force some air and free
surface (difference on the union of the two previous block).

Shenanigan: the shape of air must not have more than one line in common
with the liquid. (i.e. 1D intersection in 3D is ok, but if it get some
area, you're doom again with coincident surface)

E.g: if the liquid is a cylinder, the air must NOT be a cylinder of same
diameter & axis. It can be a superellipsoid. (Bonus: the superellipsoid
allow to also have a meniscus, for concave meniscus (i.e. not for mercury))

Using lathe & sor is of course a fine solution too. (but no common part!)

-- 
A good Manager will take you
through the forest, no mater what?
A Leader will take time to climb on a
Tree and say 'This is the wrong forest'.


Post a reply to this message

From: clipka
Subject: Re: filling a bottle with fluid
Date: 20 Aug 2012 05:52:20
Message: <503208d4$1@news.povray.org>
Am 20.08.2012 08:37, schrieb Le_Forgeron:
> Le 20/08/2012 04:52, joe a écrit :
>> I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
>> hollow and has a wall thickness.  To fill the bottle with soda I am creating
>> another lathe object inside the bottle.  To prevent a coincident surface problem
>> should I scale the soda larger to push the soda into the bottle wall?  Any
>> better ways to fill a bottle with fluid?
>>
>>
>
> Vicious: no wall thickness, not hollow (per english, hollow keyword is
> allowed, even recommended, and setting interior also ) :
>   # plain block of glass in which you put a block of liquid and finally
> you use a difference with a third block to force some air and free
> surface (difference on the union of the two previous block).
>
> Shenanigan: the shape of air must not have more than one line in common
> with the liquid. (i.e. 1D intersection in 3D is ok, but if it get some
> area, you're doom again with coincident surface)
>
> E.g: if the liquid is a cylinder, the air must NOT be a cylinder of same
> diameter & axis. It can be a superellipsoid. (Bonus: the superellipsoid
> allow to also have a meniscus, for concave meniscus (i.e. not for mercury))

Now that's some ingenious solution! I never thought of that.


Post a reply to this message

From: joe
Subject: Re: filling a bottle with fluid
Date: 20 Aug 2012 10:40:00
Message: <web.50324b2fda492ada9949baae0@news.povray.org>
"jhu" <nomail@nomail> wrote:
> "joe" <nomail@nomail> wrote:
> > I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
> > hollow and has a wall thickness.  To fill the bottle with soda I am creating
> > another lathe object inside the bottle.  To prevent a coincident surface problem
> > should I scale the soda larger to push the soda into the bottle wall?  Any
> > better ways to fill a bottle with fluid?
>
> Here's what I usually do with such things. Make a lathe, subtract a slightly
> smaller lathe to create a hollow object, then place a slightly smaller lathe
> (just smaller than the difference) inside with appropriate media definitions. In
> all, you should have 3 of the same lathes, just different sizes.


With the liquid being slightly smaller than the cavity won't the air space
between the liquid and the wall be visible in some slight way?


Post a reply to this message

From: jhu
Subject: Re: filling a bottle with fluid
Date: 20 Aug 2012 12:40:00
Message: <web.503267e5da492adad19b0ec40@news.povray.org>
"joe" <nomail@nomail> wrote:
> "jhu" <nomail@nomail> wrote:
> > "joe" <nomail@nomail> wrote:
> > > I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
> > > hollow and has a wall thickness.  To fill the bottle with soda I am creating
> > > another lathe object inside the bottle.  To prevent a coincident surface problem
> > > should I scale the soda larger to push the soda into the bottle wall?  Any
> > > better ways to fill a bottle with fluid?
> >
> > Here's what I usually do with such things. Make a lathe, subtract a slightly
> > smaller lathe to create a hollow object, then place a slightly smaller lathe
> > (just smaller than the difference) inside with appropriate media definitions. In
> > all, you should have 3 of the same lathes, just different sizes.
>
>
> With the liquid being slightly smaller than the cavity won't the air space
> between the liquid and the wall be visible in some slight way?

Short answer: no

Long answer: no, if the camera is sufficiently far away and the "liquid" is
scaled very closely to the container. However if the camera is very close to the
container, then maybe.

Let's say your camera is 1 unit away from your bottle. You place a bottle at
<0,0,0>, then put the liquid in by scaling your bottle model by .9. You will see
a gap. However, if you scale the bottle model by .999999999 you probably won't
see the gap.


Post a reply to this message

From: joe
Subject: Re: filling a bottle with fluid
Date: 20 Aug 2012 22:30:01
Message: <web.5032f1c2da492adaad797add0@news.povray.org>
"jhu" <nomail@nomail> wrote:
<snip>
> > With the liquid being slightly smaller than the cavity won't the air space
> > between the liquid and the wall be visible in some slight way?
>
> Short answer: no
>
> Long answer: no, if the camera is sufficiently far away and the "liquid" is
> scaled very closely to the container. However if the camera is very close to the
> container, then maybe.
>
> Let's say your camera is 1 unit away from your bottle. You place a bottle at
> <0,0,0>, then put the liquid in by scaling your bottle model by .9. You will see
> a gap. However, if you scale the bottle model by .999999999 you probably won't
> see the gap.

Ok but why not just scale 1.00001 and push the liquid into the bottle wall?
Doesn't that eliminate both problems?


Post a reply to this message

From: jhu
Subject: Re: filling a bottle with fluid
Date: 21 Aug 2012 12:45:00
Message: <web.5033ba63da492adad19b0ec40@news.povray.org>
"joe" <nomail@nomail> wrote:
> "jhu" <nomail@nomail> wrote:
> <snip>

> >
> > Let's say your camera is 1 unit away from your bottle. You place a bottle at
> > <0,0,0>, then put the liquid in by scaling your bottle model by .9. You will see
> > a gap. However, if you scale the bottle model by .999999999 you probably won't
> > see the gap.
>
> Ok but why not just scale 1.00001 and push the liquid into the bottle wall?
> Doesn't that eliminate both problems?

I don't think I've ever tried that. Try them both out, and see which one works
better.


Post a reply to this message

From: Alain
Subject: Re: filling a bottle with fluid
Date: 21 Aug 2012 19:05:02
Message: <5034141e$1@news.povray.org>

> "jhu" <nomail@nomail> wrote:
>> "joe" <nomail@nomail> wrote:
>>> I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
>>> hollow and has a wall thickness.  To fill the bottle with soda I am creating
>>> another lathe object inside the bottle.  To prevent a coincident surface problem
>>> should I scale the soda larger to push the soda into the bottle wall?  Any
>>> better ways to fill a bottle with fluid?
>>
>> Here's what I usually do with such things. Make a lathe, subtract a slightly
>> smaller lathe to create a hollow object, then place a slightly smaller lathe
>> (just smaller than the difference) inside with appropriate media definitions. In
>> all, you should have 3 of the same lathes, just different sizes.
>
>
> With the liquid being slightly smaller than the cavity won't the air space
> between the liquid and the wall be visible in some slight way?
>
>
You won't see the gap itself if it's small enough.

BUT there will be extra reflections and highlights.
There will be broader total internal reflection from the glass object.
There will be total internal reflection from the liquid that should be 
totaly absent.
Those two effects are caused by the very small gap. There is no way to 
prevent those.
Making the liquid slightly larger also don't help as it just change the 
places where those problem will manifest themselves.

There will be reflection from the surfaces. Those can be reduced by 
tweaking the finishes of the glass and the liquid. It involve having a 
different finish only in the areas where the glass and liquid are in 
contact. Tricky but possible.



Alain


Post a reply to this message

From: Thomas de Groot
Subject: Re: filling a bottle with fluid
Date: 22 Aug 2012 04:12:49
Message: <50349481$1@news.povray.org>
On 21-8-2012 4:26, joe wrote:
> Ok but why not just scale 1.00001 and push the liquid into the bottle wall?
> Doesn't that eliminate both problems?

No. See image in p.b.i.

Thomas


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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