Skip to content

Instantly share code, notes, and snippets.

@aaizemberg
Last active August 29, 2015 14:10
Show Gist options
  • Save aaizemberg/13feb24cd4cd72c49886 to your computer and use it in GitHub Desktop.
Save aaizemberg/13feb24cd4cd72c49886 to your computer and use it in GitHub Desktop.
svg circles using Raphael.js
<!DOCTYPE html>
<html>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<meta charset="utf-8">
<title>SVG desde Raphael</title>
</head>
<body>
<script>
var w = 960,h = 500, λ = 0.1;
var paper = Raphael(0, 0, w, h);
var r, cant = 100;
for (i = 1; i <= cant; i++) {
r = 25 * i;
paper.circle( i*(w/(cant+1)), h/2, r * λ);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment