POV-Ray : Newsgroups : povray.pov4.discussion.general : Suggest v4.0 ripples, waves re-work. (povr R7 v0.6.1.0) : Suggest v4.0 ripples, waves re-work. (povr R7 v0.6.1.0) Server Time
18 May 2024 05:23:01 EDT (-0400)
  Suggest v4.0 ripples, waves re-work. (povr R7 v0.6.1.0)  
From: William F Pokorny
Date: 18 Mar 2023 09:58:19
Message: <6415c37b$1@news.povray.org>
There are a number of issues with the current ripples and waves 
patterns. For the record, there is a set of two for normal{} 
perturbation and another scalar value set of two for use with functions 
and maps.

I've not yet pulled the number_of_waves code, but otherwise testing is 
looking pretty good. The updated ripples code is roughly 18% slower and 
the waves pattern about 20% slower for 10 sources.

The basic form of both support the keywords:

ripples & waves basic (ip_ means internal to pattern)
ip_seed <float> // Seed for point source locations.
ip_count <number of sources> // Number of sources. 2-128 currently.
ip_frequency <float>
ip_phase <float>

waves only basic (waves has always generated source weights/freq too)
lo <float> hi <float> // re-range inv weight 0-1.1 values to...

ripples & waves extended (Use of keywords triggers the extended mode)
ip_scale <3d vector>
ip_fade_distance <float post ip_scale> // interior exp fade

Example used for right side of attached image.
#declare Fn00 = function { pattern {
     raw_wave // No attempt a heuristic in povr. Adj on use.
     ip_frequency 2
     ip_count 14
     ip_seed e
     lo 0.3 hi 1.0  // Left side of image didn't use this
     ip_scale <11,0.1,11>
     ip_fade_distance e
     scale <1/11,1,1/11>

I spent some time re-rendering a waves based isosurface using a scene 
with a seed based upon now. Results are interesting. Some very good and 
some kinda ugly due where the point sources ended up. If looking around 
for a good seed, remember to print it out or otherwise
save it for re-use! :-)

Plus, if thinking about, say, the surface of water, it helps quite a bit 
to use ip_scale to compress / scale locations toward the plane of the 

Bill P.

Post a reply to this message

Download 'rippleswavesstory.jpg' (47 KB)

Preview of image 'rippleswavesstory.jpg'


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