Everyday graphic

Mon 16 March 2015
By stu

Not sure how practical it is, but will try and upload a new graphic everyday .. to start with will probably be quite basic :) Here is the first, some moving granular thingies..

Shoebot code:

``` {: .brush:python} import random from math import sin, cos

size(800, 800) colours=ximport("colors")

def draw(): background(colors.aliceblue()) scale(1, 1) nostroke() fill(0.1, 0.2, 0.3)

random.seed(0)
for y in xrange(0, HEIGHT, 80):
    wiggle = sin(FRAME * 0.1)
    xs = 2.0 + (cos(y * 0.1) + sin(y) * 8.1)

    distance = 1.0 / HEIGHT * y
    fill(1.0, 1.0-distance, 0, distance)
    for x in xrange(0, 60):
        xpos = ((xs * FRAME-x * 40) % (WIDTH + 40)) - 20
        circle(xpos, y + (wiggle * random.random() * 20.0), 20 + (wiggle * 2.0) * distance * 8.0)

    #xs = -sin(y) * 4.0
    #for x in xrange(0, 60):
    #    circle(WIDTH-xs * WIDTH - FRAME + x * 40, y+40, 20)

```

To run this, install shoebot and type: sbot -w granuals.sbot