exponentialSpiralIn.frink

View or download exponentialSpiralIn.frink in plain text format



use pi.frink

digits = 100
pi = Pi.getPi[digits]
piStr = "$pi"

g = new graphics
p = new polyline
d = 0

for i=2 to digits+2
{
   x = -cos[.5 i] * 1.7 i
   y = - sin[.5 i] * 1.7 i
   diam = 18/log[digits+4-i]
   g.color[0,0,0]
   g.drawEllipseCenter[x,y,diam,diam]
   g.font["SansSerif", diam]
   g.color[.5,.5,.5]
   g.text[substrLen[piStr,digits-d,1],x,y]
   d = d + 1
   p.addPoint[x,y]
}

g.color[0.8,0.8,.9]
g.add[p]
g.show[]
g.write["spiral4.svg",800,600]


View or download exponentialSpiralIn.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 17649 days, 5 hours, 45 minutes ago.