POV-Ray : Newsgroups : povray.general : How do you get more than one ripple... Server Time
16 Nov 2024 09:21:54 EST (-0500)
  How do you get more than one ripple... (Message 1 to 4 of 4)  
From: Patrick Dugan
Subject: How do you get more than one ripple...
Date: 23 Sep 1998 13:47:12
Message: <36092610.0@news.povray.org>
I have a cylinder that I am trying to display two ripple points in.  As
though there are two points
from which the ripples originate.   I have tried the code below but only the
last defined normal takes
effect.   Is there any way to apply 2 ripples (or more) to one object?

   cylinder {<0,0,0> <0,0,0.3>, 2.4
      texture{Soft_Silver}
      normal { average normal_map {[ ripples 0.8 scale 0.04 translate
<-1,0,0> ]}}
      normal { average normal_map {[ ripples 0.8 scale 0.04 translate <
1,0,0> ]}}
   }


Post a reply to this message

From: Ken
Subject: Re: How do you get more than one ripple...
Date: 23 Sep 1998 14:01:05
Message: <3609298C.D392FFA2@pacbell.net>
Patrick Dugan wrote:

> I have a cylinder that I am trying to display two ripple points in.  As
> though there are two points
> from which the ripples originate.   I have tried the code below but only the
> last defined normal takes
> effect.   Is there any way to apply 2 ripples (or more) to one object?
>
>    cylinder {<0,0,0> <0,0,0.3>, 2.4
>       texture{Soft_Silver}
>       normal { average normal_map {[ ripples 0.8 scale 0.04 translate
> <-1,0,0> ]}}
>       normal { average normal_map {[ ripples 0.8 scale 0.04 translate <
> 1,0,0> ]}}
>    }

  Try rendering the following Pov code.
It will show two overlapping sets of rings.
You should have no problem adapting it to
your scene.

camera{location<0,0,-35>look_at 0}

light_source{<0,  40,-670>rgb 1}
light_source{<0,1000,-100>rgb 1}

plane{z, 150 texture{pigment{rgb 1}
normal{average normal_map{
[.5 ripples 1 scale .5 translate x*-5]
[ 1 ripples 1 scale .5 translate x*5 ]}scale 10}}}

Ken Tyler


Post a reply to this message

From: Hendrik Knaepen
Subject: Re: How do you get more than one ripple...
Date: 23 Sep 1998 16:20:43
Message: <360949F9.13DC597@skynet.be>
Patrick Dugan wrote:

> I have a cylinder that I am trying to display two ripple points in.
> As
> though there are two points
> from which the ripples originate.   I have tried the code below but
> only the
> last defined normal takes
> effect.   Is there any way to apply 2 ripples (or more) to one object?
>
>    cylinder {<0,0,0> <0,0,0.3>, 2.4
>       texture{Soft_Silver}
>       normal { average normal_map {[ ripples 0.8 scale 0.04 translate
> <-1,0,0> ]}}
>       normal { average normal_map {[ ripples 0.8 scale 0.04 translate
> <
> 1,0,0> ]}}
>    }

I'm not sure, but I think you can make the ripples using an average of
two (or more) wood-patterns with (I think) sine_wave and a little
turbulence.  If you use the wood-pattern, you can exactly set the
position of the ripples, because that pattern consists of concentric
circles around the origin, and the ripples' origin is a random point (at
least as far as I remember).
Hope this works.

ZK

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     Hendrik Knaepen (hen### [at] skynetbe)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
          Idee Software -- Vlaamse ShareWare
            E-Mail: ide### [at] inamecom
         WWW: http://www.surf.to/ideesoftware
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Bezoek ons voor gratis Nederlandstalige spellen!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Post a reply to this message

From: Mike
Subject: Re: How do you get more than one ripple...
Date: 23 Sep 1998 21:34:31
Message: <3609A03C.FDB6B0C2@aol.com>
I think have a better way, and it's something I haven't heard of anyone else
doing.  If you can get your hands on POV 3.1, a spherical pattern is perfect
for making precise ripples.  For more than one you need to use average, but
try something like:

normal {
average
normal_map {
[1 spherical 1 frequency 5 translate 1*x sine_wave]
[1 spherical 1 frequency 5 sine_wave]
}
}

The pattern type is the replacement keyword for spherical_mapping.  I'm
pretty sure it's spherical, but I can't check it now, so someone correct me
if I got that wrong.  Anyway, it's pretty cool.

Frequency controls how many rings you get.  Sine_wave makes the ripples
smooth like a sine wave.  If I remember right, you can move the waves with
phase.  The pattern is created at the origin and is 1 unit in diameter.

-Mike

Hendrik Knaepen wrote:

>
>
> I'm not sure, but I think you can make the ripples using an average of
> two (or more) wood-patterns with (I think) sine_wave and a little
> turbulence.  If you use the wood-pattern, you can exactly set the
> position of the ripples, because that pattern consists of concentric
> circles around the origin, and the ripples' origin is a random point (at
> least as far as I remember).
> Hope this works.
>
> ZK
>


Post a reply to this message

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