# Oscillating Roller Cam (Clockwise)

This cam is set up as a double dwell cam with a sinusoidal rise and fall.
You can redefine the follower curve, by rewriting the definition of the function (using the JavaScript language).

The rise takes place between cam angle a and b (in radians) and the fall between c and d. You can change these values to alter the location and duration of the lifts.

Dwells are at displacements s0 and s1.

This document requires an HTML5-compliant browser.
 BC AB follower radius Cam angle 0.00000 0 6.28300 Follower angular displacement function Rise(t0,t1,h0,h1,x) //cycloidal { var h,beta,xx,s; h = h1 - h0; beta = t1-t0; xx = (x-t0)/beta; return h0+ h*(xx-Math.sin(2*Math.PI*xx)/(2*Math.PI)); } var a=0.5; var b=2.2; var c=4; var d=5; var s0=1; var s1=1.2; var u = x/(2*PI); x=(u-floor(u))*2*PI; if (x

To change from sinusoidal rise to modified trapezoid, replace the Rise function with this:

function Rise(t0,t1,h0,h1,x) // Modified Trapezoid
{
var h,beta,xx,s;
h = h1 - h0;
beta = t1-t0;
xx = (x-t0)/beta;

if (xx < 0.125) return h0+h*(0.38898448*xx-0.0309544*Math.sin(4*Math.PI*xx));
if (xx < 0.375) return h0+h*(2.44406184*xx*xx-0.22203097*xx+0.00723407);
if (xx < 0.625) return h0+h*(1.6110154*xx-0.0309544*Math.sin(4*Math.PI*xx-Math.PI)-0.3055077);
if (xx < 0.875) return h0+h*(-2.44406184*xx*xx+4.6660917*xx-1.2292648);
return h0+h*(0.6110154+0.38898448*xx+0.0309544*Math.sin(4*Math.PI*xx-3*Math.PI));
}

App generated by Geometry Expressions