# Examples (from old site)

Here are the example programs that were included in the old website. They might not work, as they were created with an old version of Cyril.

You might be better to checkout the Examples section of our new Medium site, or Dan Hett’s Cyril Patterns site.

How not to draw a circle:

`scale 2rotateshape vert 0,0 for i: 0 to TWO_PI step 0.1  vert sin(i),cos(i) end vert 0,1end`

Particles emitted when the kick hits…

`light 0,0,10palette \$p 10 #ffff00 10 #ff00ffendDECAY: 0.01rotate TIME * 2if KICK  particle KICK / 10,0,0,-0.005    color lerp(\$p, HEALTH)    ball 1  endend`

Draw the FFT waveform. The FFT bands go from 0 to 32. Loop around this and draw a custom shape with vertices based on the FFT values:

`scale 0.125move -16,16,0shape vert 0,0 for x: 1 to 34 step 1   vert x,0 - 5 * fft(x - 1) endend`

Fire and boxes:

`palette \$fire  1 #ffff00  10 #ff0000endDECAY: 3move 0, 1, -4c: map(TIME % 1000, 0, 1000, 0, 1)color lerp(\$fire, c)do 10 times  pushMatrix  rotate rand(180) + 180  particle rand(0.125), 0, rand(0.5), 0, 0, 0    h: map(HEALTH, 0, 1, 0,250)    color lerp(\$fire, HEALTH), h    rect 0.25, 0.25  end  popMatrixend`

Balls and boxes move across the screen randomly from right to left:

`do 4 times  move 7, rand(8) - 4 , 0  particle 0 - 0.5 * wave(100), 0, 0, 0, 0, 0   a: map(HEALTH, 0, 1, 200, 0)   move 0, 0, 1 - HEALTH   color #ff0000, a   ball 1 - HEALTH   color #ffffff, a   box 0.5  endend`

Lots of randomly coloured boxes flying towards you:

`DECAY: 4rotate TIME * 2move 2, 0, 0do 4 timesparticle 0.015, 0, 0, 0, 0, 0  a: map(HEALTH, 0, 1, 0, 255)  color #ff00ff, a  move 0, 0, map(HEALTH, 0, 1, 5, -2)  box 0.5  color #ffff00, a  move 0, 0, -10 * HEALTH  box  color hsb(rand(255), 255, 255)  boxendrotate 90end`
Like what you read? Give Daz a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.