Skip to content

Instantly share code, notes, and snippets.

@alirezarezamand
Created June 29, 2025 23:55
Show Gist options
  • Save alirezarezamand/f009e0445223ee757299869814aa7f53 to your computer and use it in GitHub Desktop.
Save alirezarezamand/f009e0445223ee757299869814aa7f53 to your computer and use it in GitHub Desktop.
Phi spirals
- const phi = 0.5 + Math.sqrt(5)/2
- var n = 0;
-radius = 90
- count= 600
svg(viewBox="-100 -100 200 200")
while n < count
circle(r=0.5 + 2*n/count cx=n*(radius/count) transform=`rotate(${n*(360/phi)})`)
- n = n + 1
body{
display: grid;
place-items: center;
min-height: 100vh;
margin:0;
background: gold
}
svg{
height: 90vmin;
width:90vmin
}
circle{
fill: black;
}
@alirezarezamand
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment