# What is the mathematical formula behind the Env object? more specificaly how is "curve" derived mathematicaly?

Hello everyone!

I need to underastand how the Env object draws the shape of the envelope in order to use it in a project that I am working on.

Env.new(levels: [0, 1, 0.9, 0], times: [0.1, 0.5, 1], curve: [-5, 0, -5]).plot;

the levels and times are self explanatory, but what about Curve?
Obviously it describes curvature, but according to what? is it somehow derived from the tangent line at that point, is it the best approximating circle that passes through that point and use its reciprocal radius to describe it? what is the formula behind it? I need to know because lets say I would like to reconstruct the same line in a different program that uses a different logic to construct lines… Basically how is “curve” derived?

any insight would be highly appreciated!

thank you

You can find the equation for `curve` in the `lincurve` method. This should match the implementations in other places like envelopes / on the server.

1 Like

Hi, maybe this helps: