POV-Ray : Newsgroups : povray.general : Need a function : Re: Need a function Server Time
30 Jul 2024 06:23:25 EDT (-0400)
  Re: Need a function  
From: gregjohn
Date: 13 Oct 2009 06:45:00
Message: <web.4ad4596e6d9ca9b034d207310@news.povray.org>
SharkD <mik### [at] gmailcom> wrote:
> SharkD wrote:
> > I need a function similar to spherical, except where the strength drops
> > off at a different (i.e. nonlinear) rate:
> >
> >     Strength = sin(acos(Radius))
> >
> > I'm not sure how to implement it in POV SDL though...
> >
> > -Mike
>
> Err... I *think* this is how to do it:
>
> function {sin(acos(f_r(x,y,z)))}
>
> Correct?
>
> -Mike


I had fun trying some variations on this theme.

cos(atan(r)) gives a much more satisfying decrease with distance.

a/(a+r) or a^(-r) will work too, but give a catastrophic drop-off.


Post a reply to this message

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