Skip to content

Instantly share code, notes, and snippets.

@jasonblanchard
Last active December 14, 2015 06:19
Show Gist options
  • Save jasonblanchard/5042090 to your computer and use it in GitHub Desktop.
Save jasonblanchard/5042090 to your computer and use it in GitHub Desktop.
x = 180; // x coordinate of inner circle
y = 30; // y coordinate of inner circle
r = 30; // distance from the center circle
n = 5; // number of outter circles
for (i = 1; i <= n; i++) {
x1 = r * Math.cos((i * 2 * Math.PI)/n) + x;
y1 = r * Math.sin((i * 2 * Math.PI)/n) + y;
paper.circle(x1, y1, 10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment