//
/////////////////////////////////////////////////////
//Programming Concepts and Applications
//for Artists and Designers
//Keith Kelley/task 08
/////////////////////////////////////////////////
//
// wavelength = amplitude * periodicFunction(frequency * time + phaseShift)
//
// define a function to perform updates to the stage
function circleAnimationstep(whichCircle, bounds) {
// bounds[0] = left edge of cell
// bounds[1] = top edge of cell
// bounds[2] = right edge of cell
// bounds[3] = bottom edge of cell
//determines rate_speed
var period = 7 * 1000;
var milliseconds = (new Date()).getTime();
var radians = (2 * Math.PI) * ((milliseconds % period) / period);
//
var norm = whichCircle / circles.length
//higher values produce choppy frame rates
var frequency = 2;
var phaseShift = norm * (7 * Math.PI);
//bouncy circle_springs x translation
circles[whichCircle]._x = rangedCos(radians, frequency, phaseShift, bounds[0],
bounds[2]);
//bouncy circle_springs y translation
circles[whichCircle]._y = rangedCos(radians, frequency+1, phaseShift, bounds[2],
bounds[1]);
//bouncy circle_springs opacity
circles[whichCircle]._alpha = rangedCos(radians, frequency, phaseShift, 50,
100);
//bouncy circle_springs x scale
circles[whichCircle]._xscale = rangedCos(radians, frequency, phaseShift, 1,
400);
//bouncy circle_springs y scale
circles[whichCircle]._yscale = rangedCos(radians, frequency, phaseShift, 1,
400);
}
//Results are springy, but how would color, or edge thickness be modified?
//