Et eksempel:
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>Cirkel-punkter</title>
<meta name="keywords" content="roenving;
http://www.eksperten.dk/spm/430362"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body{width:100%;height:100%}
div,img{width:2px;height:2px;}
</style>
<script language="javascript" type="text/javascript">
function markCirclePoints(n,c,r){
if(isNaN(n)&&!n.match(/^\d+$/))return;
n = +n
var diff = (Math.PI*2)/n;
for(i=0;n>i;i++){
l = Math.round((Math.sin(diff*i)*r) + c[0]);
t = Math.round((Math.cos(diff*i)*r) + c[1]);
//alert(l+"\n"+t);
d = document.createElement('DIV');
document.body.appendChild(d);
d.style.position = 'absolute';
d.style.height = '2px';
d.style.width = '2px';
d.style.top = t + 'px';
d.style.left = l + 'px';
d.style.background = "red";
d.innerHTML = "<img src='../transparent.gif'>"
}
}
</script>
</head>
<body>
<br>
<form id="minForm" name="minForm">
<button name="button2" id="button2" onclick="markCirclePoints(24,[200,200],100)">Vis cirkel !-)</button>
</form>
</body>
</html>