an orignal (?)...cover!
function writeInCircle(phrase, cx, cy, fontSize) {
var num = phrase.length
var r = num * fontSize / 6
var d = $("").addClass("writeInCircle").appendTo("body")
$(d).css({position:"absolute",
width: (2*r) + "px",
height: (2*r) + "px",
left: (cx-r) + "px",
top: (cy-r) + "px"})
for (var i=0; i < num; i++) {
var s = $("
").html( phrase.charAt(i)).appendTo(d)
a = i/num *2*Math.PI
var x = cx + r*Math.cos(a)
var y = cy + r*Math.sin(a)
$(s).css({"position":"absolute",
left: x + "px", top: y + "px",
"fontSize": fontSize, "transform":"rotate(" + a + "rad)" })
console.log(z.charAt(i) + " " + x + "," + y)
}
}
see http://jsfiddle.net/alemarch/42o8hqb7/ http://jsfiddle.net/alemarch/42o8hqb7/1/ http://jsfiddle.net/alemarch/42o8hqb7/2/ http://jsfiddle.net/alemarch/42o8hqb7/3/