POV-Ray : Newsgroups : povray.newusers : Internal Function Details? : Re: Internal Function Details? Server Time
4 Nov 2024 13:45:27 EST (-0500)
  Re: Internal Function Details?  
From: Christoph Hormann
Date: 23 Oct 2002 04:27:03
Message: <3DB65D56.4B0C52F5@gmx.de>
D Matthews wrote:
> 
> OK, I think I've searched all the easily available help files, and I can't
> find the answer to this one.  Is there some place where the actual formulas
> for the internal functions are available (without trying to puzzle out the
> source code)?

No, but finding it in the source isn't really that difficult.  Just look
into 'fnintern.cpp':

DBL f_spikes(DBL *ptr, unsigned int) // 62
{
  DBL r,x2,y2,z2;
  x2=PARAM_X*PARAM_X; y2=PARAM_Y*PARAM_Y; z2=PARAM_Z*PARAM_Z;
  r= exp(-(x2+y2+z2)*PARAM(3))*PARAM(4)         
-exp(-(x2*PARAM(0)+y2*PARAM(0)+z2)*PARAM(1))
    -exp(-(x2*PARAM(0)+y2+z2*PARAM(0))*PARAM(1))
-exp(-(x2+y2*PARAM(0)+z2*PARAM(0))*PARAM(1));
  return(-r*PARAM(2));
}

I think that's pretty self explanatory.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

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