POV-Ray : Newsgroups : povray.off-topic : Too many pipes? : Re: Sum ting wong Server Time
7 Sep 2024 05:11:58 EDT (-0400)
  Re: Sum ting wong  
From: scott
Date: 22 Oct 2008 05:33:57
Message: <48fef385$1@news.povray.org>
>>>   (v[x-1] - v[x]) + (v[x] - v[x+1]) =
>>
>> That should be a "-" in the middle, because you are taking the 
>> differential of the differential.
>
> The above formula is only meant to be the 1st derivative. I run it twice 
> to get the second derivative.

To get the 1st derivative you just need:

v[x+1] - v[x]

What you are doing is to essentially average the differential of one point 
and the point before, which is going to blur out any sharp gradients.  (eg 
if you have points 5 0 5 the gradient your way will come out as zero)


Post a reply to this message

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