Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
executable file 63 lines (43 sloc) 1.12 KB
# -*- coding: utf-8 -*-
from sys import argv
from desert.helpers import filename
from numpy import array
from numpy import cos
from numpy import pi
from numpy import sin
from numpy import zeros
from numpy.random import random
from desert import Desert
from desert import stroke
from desert.color import rgb
from desert.color import white
from desert.color import black
from time import time
TWOPI = 2.0*pi
def main(arg):
with Desert(1000, show=True, verbose=VERBOSE)\
bg=white()) as c:
density = 0.02
a = random(2)*TWOPI
acc = zeros(2)
noise = 0.000000005
rad = 0.45
resa = []
resb = []
for i in range(4000000):
a += acc
acc += (1-2*random(2))*noise
resa.append((cos(a[0]), sin(a[0])))
resb.append((cos(a[1]), sin(a[1])))
if not i%100000:
c.draw([stroke(0.5 + array(resa)*rad,
0.5 + array(resb)*rad,
resa = []
resb = [], gamma=1.5)
if __name__ == '__main__':