POV-Ray : Newsgroups : povray.general : Sphere function Server Time
29 Dec 2024 00:06:19 EST (-0500)
  Sphere function (Message 1 to 3 of 3)  
From: posfan12
Subject: Sphere function
Date: 11 Oct 2013 06:15:02
Message: <web.5257cf68faa4433341a177270@news.povray.org>
I need a function to use in densities that is like the existing spherical
density, but gets weaker based on the square of the distance instead of a linear
radius.

I couldn't find one in "functions.inc" unless I missed it.

Thanks!!


Mike


Post a reply to this message

From: scott
Subject: Re: Sphere function
Date: 11 Oct 2013 06:23:26
Message: <5257d19e$1@news.povray.org>
> I need a function to use in densities that is like the existing spherical
> density, but gets weaker based on the square of the distance instead of a linear
> radius.

Something like this:

#declare f_Example = function{ 1/(x*x + y*y + z*z) }


Post a reply to this message

From: posfan12
Subject: Re: Sphere function
Date: 11 Oct 2013 11:50:00
Message: <web.52581db8c251fe7c41a177270@news.povray.org>
scott <sco### [at] scottcom> wrote:
> > I need a function to use in densities that is like the existing spherical
> > density, but gets weaker based on the square of the distance instead of a linear
> > radius.
>
> Something like this:
>
> #declare f_Example = function{ 1/(x*x + y*y + z*z) }

I think that works. Thanks!


Mike


Post a reply to this message

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