POV-Ray : Newsgroups : povray.general : Need a function Server Time
4 Nov 2024 17:31:47 EST (-0500)
  Need a function (Message 1 to 4 of 4)  
From: SharkD
Subject: Need a function
Date: 28 Aug 2009 03:44:22
Message: <4a978ad6$1@news.povray.org>
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


Post a reply to this message

From: SharkD
Subject: Re: Need a function
Date: 28 Aug 2009 03:47:38
Message: <4a978b9a$1@news.povray.org>
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


Post a reply to this message

From: Alain
Subject: Re: Need a function
Date: 29 Aug 2009 15:48:31
Message: <4a99860f$1@news.povray.org>
SharkD a écrit :
> 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

You can use a color_map.
You can use another wave form, it default to a ramp_wave. Try sine_wave.


Alain


Post a reply to this message

From: gregjohn
Subject: Re: Need a function
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.