# Taken from: www.contextfreeart.org/gallery/view.php?id=4227 # # 13.05.2021

CF::Background = [ b -0.95 sat 0.2 h 180 ] CF::Impure = 1 CF::MaxNatural = 15000

S=15000 segments = 20+randint(S) multiplier = 4 +randint(S/7) rad = 0.1..10 e=-6..6,-6..6,-6..6,-6..6 M=2+randint(7)

startshape C ( segments, multiplier ) [ h 0..360]

vector2 p2c (p) = cos(p), sin(p) p(i,m)=i*360/m

shape C ( natural m, natural t ) {

loop i=m [ ]
{
  j = mod(i*t, m)
  start = p2c (p(i,m))
  end = p2c (p(j,m))

  H=if(mod(i,M)==0, -150, 6 )+-5..5
  A=if(mod(i,M)==0, -0.6, -0.9 )

  LINE ( start, end, i ) [a A h H b 1 sat 0.1..0.9 blend CF::Screen]
}

}

path LINE ( vector2 start, vector2 end, number i ) {

MOVETO ( start[ 0 ], start[ 1 ]  )
if ( mod(i,M)==0)
  ARCTO ( end[ 0 ], end[ 1 ], rad, e[0], e[1], CF::ArcCW  ) 
else
  ARCTO ( end[ 0 ], end[ 1 ], rad, e[2], e[3], CF::ArcLarge  ) 
STROKE (0.00525) []

}