This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Physics stolen from: | |
# http://giphy.com/gifs/wave-circle-point-13ePqdDflwat9e | |
def blobPos(pt, r, a): | |
x, y = pt | |
x += cos(a) * r | |
y += sin(a) * r | |
return (x, y) | |
def drawGrid(cells): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://dailydrawbot.tumblr.com/post/141565208389/oscilloscope-lissajous | |
canvasSize = 500 | |
nFrames = 20 | |
nSteps = 20 | |
radius = 195 | |
nEchoes = 20 | |
nScopeLines = 10 | |
xFrequency = 3 | |
yFrequency = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nCirclesH = 18; nCirclesV = 6: | |
# http://dailydrawbot.tumblr.com/post/138985675364/psychodonut-2 | |
# nCirclesH = 38; nCirclesV = 28: | |
# http://dailydrawbot.tumblr.com/post/139047595845/psychodonut-3 | |
def project(x, y, innerR, outerR, phase): | |
# convert from "donut space" to normal space | |
angle = 2 * pi * x | |
f = (cos(phase + pi * y) + 1) / 2 | |
R = innerR + f * (outerR - innerR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A moving tribute to Ellsworth Kelly's "Seine" (1951). | |
from random import seed # seed() allows us to get repeatable pseudo-noise | |
def expandGrid(pixels): | |
assert len(pixels) % 2 | |
mid = len(pixels) // 2 | |
midColumn = pixels[mid] | |
pixels.insert(mid + 1, list(midColumn)) | |
pixels.insert(mid + 0, list(midColumn)) |
NewerOlder