Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vishal-rana/0cc7f7cbc7a4c5d89fea to your computer and use it in GitHub Desktop.
Save vishal-rana/0cc7f7cbc7a4c5d89fea to your computer and use it in GitHub Desktop.
from random import random
import math
x_size=800
y_size=40
x_itr=4
y_itr=4
def setup():
size(x_size,y_size)
background(255,255,255)
noStroke()
noLoop()
def draw():
smooth()
for y in range(0,y_size+y_itr,y_itr):
for x in range(0,x_size+x_itr,x_itr):
rgb=random()*255
if int(rgb) > 175:
rgb = 255
else:
rgb = 0
fill(rgb,rgb,rgb)
ellipse(x,y,x_itr,y_itr)
saveFrame("banner.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment