# About the source code of LFNoise2

Hi there.

I am trying to understand some UGens source code.
I almost understood about LFNoise0 and LFNoise1, but LFNoise2 didn’t.
Especially the line that inside the rectangle is the problem.

I can only guess that the line is about differentiation.

Thanks.

Its using quadratic interpolation. Here’s a paper - https://people.math.sc.edu/kellerlv/Quadratic_Interpolation.pdf - I believe the line you have highlighted is the second part of figure 2.2 in the paper.

Thank you for the reply!

I’ve been looking for some more.

In the code,
the slope variable seems to be the ‘slope’ of the graph that connects a current point to a next point.
And the curve variable seems to be the amount of change in the slope of the graph.

If so, the value of curve is obtained by differentiating a second-order polynomial twice.
Formally, this value becomes 2a.

f(x) = a*(x^2) + b*x + c
f '(x) = 2ax + b
f ‘’(x) = 2a // ----> curve

After doing this,
it seems like using the fomula getting value of ‘a’ in figure 2.2 of the paper you suggested.

This is my guess so far.

But I still don’t know why the sign of the denominator is different and it adds with fseglen in the code, but not in the fomula.