POV-Ray : Newsgroups : povray.animations : Isosurface 'water' but it goes concave : Re: Isosurface 'water' but it goes concave Server Time
28 Jul 2024 10:16:05 EDT (-0400)
  Re: Isosurface 'water' but it goes concave  
From: Mike Williams
Date: 8 Jul 2001 03:46:38
Message: <3SJmpDAo7AS7Ewjw@econym.demon.co.uk>
Wasn't it Bob H. who wrote:
>"John D. Gwinner" <jgw### [at] hotmailcom> wrote in message news:3b4778d1$1@news.p
>ovray.org...
>>
>>   The closest I have so far is an Isosurface, which looks good but when I
>> animate it I get something odd: 'phase' identifier in the wrinkles (or waves
>> or ripples) causes the surface to move *down* not across, so it causes a
>> concavity.  I tried different combinations of functions, rotations, etc. and
>> it doesn't seem to work.   An example - I replaced 'clock' in the phase with
>> a .5 so you can see what it looks like.
>
>Changed your script code around a little and got a nice little water surface 
>showing caustics on
>the ground below the isosurface.
>
>
> I'm not savy enough to know why there is a overall concave surface, as
> seen when wrinkles is used instead of ripples.  Mystery to me, sorry I
> couldn't solve that.  However the surface does move in a way which you
> wanted I believe. I animated it with that ripples pattern and it 
> looked right enough to me.  Well, I take that back, looks like 
> something's wrong with the container bounds but I'm not sure.

The concavity is due to subtracting a sphere from the function. You've
got

    function {
        y-(sqrt(sqr(x) + sqr(y) + sqr(z))// - 1
         - WrinklesFunc(x, y, z) * WaveDepth)/10
    }

         which is   plane - (sphere - Wrinkles)/10

The concavity effect looks more pronounced when you use wrinkles because
the ripples are higher than the wrinkles. You can see the underlying
concavity more clearly of you temporarily set the WaveDepth to zero.

If we get rid of the spherical component 

    function {
        y + WrinklesFunc(x, y, z) * WaveDepth/10
    }

         then we get ripples on a flat surface instead of a concave one.

Your fix for the main problem - adding sine_wave to the WrinklesFunc -
declaration also works for the wrinkles pattern, and is rather more
elegant than my shifting of the colour_map in phase with the clock.

Your container looks fine to me.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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