1. 三角函数
2.JavaScript的函数的使用
3. 角度
4. 圆周运动的例子
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.box{
width:20px;
height:20px;
background:yellow;
position: absolute;
}
</style>
</head>
<body>
</body>
<script>
var x=700;
var y=300;
var r=100;
var num=1;
var box=document.createElement("div");
box.className="box";
setInterval(function(){
var a=Math.sin(num*Math.PI/180)*r;
var b=Math.cos(num*Math.PI/180)*r;
box.style.top=y+a+"px";
box.style.left=x+b+"px";
num++;
document.body.appendChild(box);
},10)
</script>
</html>
原文:http://www.cnblogs.com/supermanGuo/p/6901598.html