sin cos rot back
HTML
<div>*</div>
CSS
div {
position: absolute;
top: 50%;
left: 50%;
}
JavaScript
$(function() {
var fps = 100;
var a = 0;
draw = function() {
a += 0.001;
var x = ((Math.cos(a) + 1) / 2) * 90;
var y = ((Math.sin(a) + 1) / 2) * 90;
$("div").css("left", x + "%");
$("div").css("top", y + "%");
}
update_frame = function(fps) {
draw();
setTimeout(function() {
update_frame(fps)
}, (1000. / fps));
}
update_frame(fps);
});