By plugging these into the rise part of each app page, the system will be able to generate a particular cam for a particular output shape.
function Rise(t0,t1,h0,h1,x) // Modified Sine
{
var h,beta,xx,s;
h = h1 - h0;
beta = t1-t0;
xx = (x-t0)/beta;
if (xx < 0.125) return h0+h*(.43990085*xx-.0350062*Math.sin(4*Math.PI*xx));
if (xx < 0.875) return
h0+h*(.28004957+.43990085*xx-.31505577*Math.cos(((4*Math.PI*xx)/(3))-(Math.PI/6)));
return
h0+h*(.56009915+.43990085*xx-.0350062*Math.sin(2*Math.PI*2*xx-2*Math.PI));
}
function Rise(t0,t1,h0,h1,x) // Double Harmonic
{
var h,beta,xx,s;
h = h1 - h0;
beta = t1-t0;
xx = (x-t0)/beta;
if (xx < .5) return
h0+h/2*((1-Math.cos(Math.PI*xx)-.25*(1-Math.cos(2*Math.PI*xx)));
return h0+h/2*((1+Math.cos(Math.PI*xx))-.25*(1-Math.cos(2*Math.PI*xx)));
}
function Rise(t0,t1,h0,h1,x) // 3-4-5 Polynomial
{
var h,beta,xx,s;
h = h1 - h0;
beta = t1-t0;
xx = (x-t0)/beta;
return h0+h*(10*xx*xx*xx-15*xx*xx*xx*xx+6*xx*xx*xx*xx*xx);
}