POV-Ray : Newsgroups : povray.advanced-users : A Question about water Server Time
26 Nov 2024 06:30:11 EST (-0500)
  A Question about water (Message 1 to 9 of 9)  
From: Randolph Robnett
Subject: A Question about water
Date: 5 Dec 2000 19:00:27
Message: <3a2d819b$1@news.povray.org>
Any ideas about making water look as though it is funneling or spiralling as
in a whirlpool. The trick is that it needs to be 3-dimensional and not just
look 3D. Any suggestons would be appreciated.


Post a reply to this message

From: Margus Ramst
Subject: Re: A Question about water
Date: 5 Dec 2000 19:31:25
Message: <3A2D8958.70C3A3ED@peak.edu.ee>
Randolph Robnett wrote:
> 
> Any ideas about making water look as though it is funneling or spiralling as
> in a whirlpool. The trick is that it needs to be 3-dimensional and not just
> look 3D. Any suggestons would be appreciated.

You could probably do it  with isosurfaces in MegaPOV, using some sort of spiral
pattern as the function.
Another possibility is to do it with a heightfield, again a spiral pattern is
should be able to do the job.

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Home page http://www.hot.ee/margusrt


Post a reply to this message

From: Chris Huff
Subject: Re: A Question about water
Date: 5 Dec 2000 20:30:40
Message: <chrishuff-2338CA.20312405122000@news.povray.org>
In article <3a2d819b$1@news.povray.org>, "Randolph Robnett" 
<rro### [at] midwestnet> wrote:

> Any ideas about making water look as though it is funneling or 
> spiralling as in a whirlpool. The trick is that it needs to be 
> 3-dimensional and not just look 3D. Any suggestons would be 
> appreciated.

There was a thread a while ago about doing this with isosurfaces...in 
povray.unofficial.patches, I think, but I couldn't find the exact thread.
The code I came up with in that thread could still be improved, but here 
it is:

#declare Vortex =
function {
    y+(1/(sqr(x)+sqr(z)+0.3))
    +sin(atan2(x,z)*7 + y*10)*0.025
}

isosurface {
    function {Vortex(x,y,z)}
    threshold 0
    eval
    max_gradient 4
    contained_by {box {<-5,-5,-5>, < 5, 1, 5>}}
    pigment {color rgb < 0.5, 0.85, 1>}
}

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: A Question about water
Date: 6 Dec 2000 03:39:04
Message: <3a2dfb28$1@news.povray.org>
Randolph Robnett wrote in message <3a2d819b$1@news.povray.org>...
> Any ideas about making water look as though it is funneling or
spiralling as
> in a whirlpool. The trick is that it needs to be 3-dimensional and not
just
> look 3D. Any suggestons would be appreciated.


wait a few days for my patch
supporting nonlinear transformations
I think with this stuff this could be possible
as twisted cones and spheres placed around center

but currently this is possible as isosurfaces but need math a little

ABX


Post a reply to this message

From: Warp
Subject: Re: A Question about water
Date: 6 Dec 2000 06:09:52
Message: <3a2e1e7f@news.povray.org>
Why everyone suggests all the hard ways of doing the most simple thing?
Isosurfaces? Patched versions for non-linear transformations? Come on!
You really don't need any patched version for this.

camera { location <0,2,-2> look_at y*.2 angle 35 }
light_source { <10,10,-5>, 1 }

#declare WPRadius = 1;
#declare WPCurvRadius = 1.5;
intersection
{ #declare IPH = sqrt(pow(WPCurvRadius,2)-pow(WPRadius,2));
  torus { WPRadius, WPCurvRadius translate -y*IPH}
  cylinder { 0, y*(WPCurvRadius-IPH), WPRadius }
  
  pigment
  { spiral1 1 color_map { [0 rgb <.5,.75,1>][1 rgb <0,.5,1>] }
    turbulence .1
    rotate x*90
    scale <.1,1,.1>
  }
  normal
  { spiral1 1 .15 slope_map
    { [0 <0,0>][.25 <.5,1>][.5 <1,0>][.75 <.5,-1>][1 <0,0>] }
    rotate x*90
    scale <.2,1,.2>
  }
  finish { specular .5 reflection .3 }
}


-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: A Question about water
Date: 6 Dec 2000 09:54:35
Message: <3a2e532b@news.povray.org>
Warp wrote in message <3a2e1e7f@news.povray.org>...
>  Why everyone suggests all the hard ways of doing the most simple
thing?
>Isosurfaces? Patched versions for non-linear transformations? Come on!


a) selfadvertising
b) lack skills
c) looking long time at one source
d) we are hollow, not inverted

;-)

ABX


Post a reply to this message

From: Chris Huff
Subject: Re: A Question about water
Date: 6 Dec 2000 17:22:07
Message: <chrishuff-0C793C.17225306122000@news.povray.org>
In article <3a2e1e7f@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   Why everyone suggests all the hard ways of doing the most simple thing?
> Isosurfaces? Patched versions for non-linear transformations? Come on!
> You really don't need any patched version for this.

But...but that doesn't look as realistic! :-)

Really, I prefer the shapes I can get with isosurfaces(though you can 
probably do similar ones with lathe or sor), and the fact that the waves 
are real waves, not just normal perturbation.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Warp
Subject: Re: A Question about water
Date: 7 Dec 2000 09:33:11
Message: <3a2f9fa7@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:
: Really, I prefer the shapes I can get with isosurfaces(though you can 
: probably do similar ones with lathe or sor), and the fact that the waves 
: are real waves, not just normal perturbation.

  Well, if it's a question of principle, then be my guest.

  However, if the final image will look almost exactly the same independently
of whether a normal modifier or an isosurface was used, then my opinion is
that small and simple is beatiful.

  Rendering speed may be another issue. Which one renders faster, a spiral
normal modifier or an isosurface?
  I haven't tested, so I can't know, but I wouldn't be surprised if the
isosurface would be slower.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Chris Huff
Subject: Re: A Question about water
Date: 11 Dec 2000 18:03:03
Message: <chrishuff-523B03.18035711122000@news.povray.org>
In article <3a2f9fa7@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   However, if the final image will look almost exactly the same 
> independently of whether a normal modifier or an isosurface was used, 
> then my opinion is that small and simple is beatiful.

Well, even a smooth isosurface with a simple spiral normal would look 
better than a torus, in my opinion anyway. The shape of the function I 
posted is quite different from a torus, and to me looks more like a 
whirlpool.
Also, you can get better looking spiral waves with an isosurface 
function. Small and simple may be beautiful, but realism counts too.


>   Rendering speed may be another issue. Which one renders faster, a 
> spiral normal modifier or an isosurface?

If you use a torus CSG, the torus would almost definitely be faster 
compared to the function I gave. If you used a lathe or sor...you might 
have to use the isosurface just to avoid the artifacts. :-)

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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