A Pen by Michael Gehrmann on CodePen.
Created
June 29, 2025 23:55
-
-
Save alirezarezamand/f009e0445223ee757299869814aa7f53 to your computer and use it in GitHub Desktop.
Phi spirals
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
display: grid; | |
place-items: center; | |
min-height: 100vh; | |
margin:0; | |
background: gold | |
} | |
svg{ | |
height: 90vmin; | |
width:90vmin | |
} | |
circle{ | |
fill: black; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Phi spirals