Not sure what you mean with that. The code already does that, no? The slider is not a necessity.
Ok, I've worked out a better explanation for this:
Well, I mean that if we have two formulas to pick up the value of Amplitude and Period, let's say the ones I'm trying to implement:
Amplitude: 4 * cos^2(Pi*X/Period)
Period: Omega * Distance1 / 2 * Factor
Omega and Factor are given by two sliders.
They result in two real values, if they are introduced as variables in Draw Line:
Having a sinus in the Y term, we can find ourselves with a wave that doesn't depicts the numbers from our mathematical formulae.
That's the issue. I Hope this has been clearer. Tell me what do you think.