xParaEq(e, xExpr, yExpr, totalTime)
Define your own values to pass to xParaEq(). The same arguments are passed to each of the demo elements.
One variable that is within scope for your expression is the parameter t. That is, t is the argument to the equations you provide. At each iteration, the variable t increments by .008 (default value).
The Time argument to parametricEquation() specifies the total time for the slide in milliseconds. If the value is zero, the slide will not timeout. You can stop any slide, at any time, by this assignment: element.stop = true;.
The values from your expressions are plotted on a coordinate system with it's origin at the center of the sliding element's container. The coordinates are then translated by the element's container's scrollLeft and scrollTop values. So the animation will remain visible if the user scrolls or resizes the element's container.
This is a vertical sine wave with a frequency of 4, so it will make four cycles within the height of it's container. It's axis is shifted to the left by half of it's original position (the center of it's container).
X(t) = Math.cos(t*8)-.5
Y(t) = Math.sin(t)
Last updated: 6 April 2005