POV-Ray : Newsgroups : povray.newusers : Is it possible to have color_map values depend on distance from a point ? : Re: Is it possible to have color_map values depend on distance from a point= Server Time
30 Jul 2024 18:23:50 EDT (-0400)
  Re: Is it possible to have color_map values depend on distance from a point=  
From: Bernard Hatt
Date: 20 Nov 2003 13:55:00
Message: <web.3fbd0dccbe538fb825bdb9a40@news.povray.org>
Christopher James Huff wrote:
>Note that the f_noise3d() function returns a maximum of 1.0, and by
>changing the "max(0, 1 - f_r(x, y, z)" to "max(0, 1.5 - f_r(x, y, z))",
>you increase the maximum of that factor to 1.5...so the function ranges
>from 0 to 1.5, which will be wrapped when used as a pattern. If you want
>to change the radius, you should scale the result of the f_r() function
>instead:
>
>function {f_noise3d(...)*max(0, 1 - f_r(x, y, z)/1.5)}

I see what you mean, I had just been trying to increase the 'density'
of the pattern in the middle.

>You may want to play around with different falloff rates as well...think
>about what various n^2 or sqrt(n) do in the range 0..1, or what sin()
>does in the ranges 0..pi/2 and -pi/2..pi/2. Or combine several of
>these...a cos() function for a ripple effect and a quadratic falloff.
>Use atan2() to vary things with angle...

If only I could remember all the maths that I learnt years ago :-) , I
did manage to play around and produce a spirally thing:

function{f_noise3d(x/0.025,y/0.025,z/0.025)
    *(1+cos(7*atan2(x,y)+15*f_r(x,y,0)/2))
    *max(0, 1.0 - f_r(x, y, z)/2.0)}


Thanks,

Bernard


Post a reply to this message

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