<style>
body{margin:0;}
.cricle{width:100%;height:100%;position:absolute;margin-left:-50%}
span{position:absolute;border:1px solid}
</style>
<div class=cricle>
<span style='top:culc(50% -200 px);left:50%'></span>
</div>
<script src=jq.js></script>
<script>
width=$(window).width()/2
height=$(window).height()/2
r=200
x=width
y=height-200
i=0
function draw_square(){
i<200 && x++ && y++
i>=200 && i<400 && x-- && y++
i>=400 && i<600 && x-- && y--
i>=600 && i<800 && x++ && y--
$('.cricle>span:last').append("<span style='top:"+y+";left:"+x+"'></span>")
i++
setTimeout(draw_square,10)
}
draw_square()
</script>
<style>
body{margin:0;}
.cricle{width:100%;height:100%;position:absolute;margin-left:-50%}
span{position:absolute;border:1px solid}
</style>
<div class=cricle>
<span style='top:culc(50% -200 px);left:50%'></span>
</div>
<script src=jq.js></script>
<script>
width=$(window).width()/2
height=$(window).height()/2
r=200
x=width
y=height-200
function* draw_square(){
for(i=0;i<800;i++){
i<200 && x++ && y++
i>=200 && i<400 && x-- && y++
i>=400 && i<600 && x-- && y--
i>=600 && x++ && y--
yield $('.cricle>span:last').append("<span style='top:"+y+";left:"+x+"'></span>")
}
}
draw_square=draw_square()
setInterval("draw_square.next()",10);
</script>