Jim SMith
Jim SMith

Reputation: 212

HTML5 canvas draw circles around a circle path

I want to use HTML5 canvas to draw a large circle and then evenly space x number of circles around it's path,

So far I have modified this: http://jsfiddle.net/m1erickson/pL5jP/

To this: http://jsfiddle.net/dQUxy/6/

I can get them how I want if I draw them manually like so (example)

Draw(startx, starty);
Draw(startx+47, starty+47);
Draw(startx+80, starty+80);

Not very elegant. What would be the mathematical solution to drawing say, 14 circles evenly spaced around the path?

Upvotes: 0

Views: 1430

Answers (1)

Jim SMith
Jim SMith

Reputation: 212

Never mind, I found raphael.js which did the job elegantly

http://raphaeljs.com/hand.html

Upvotes: 1

Related Questions