Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by dsschieber ( 12 years ago )
#Doug Schieber
def horizon():
file = makePicture(pickAFile())
mirrorPoint = getHeight(file)/4
height = getHeight(file)
for x in range(0, mirrorPoint):
for y in range(0, getHeight(file)):
topPixel = getPixel(file, x, y)
bottomPixel = getPixel(file, mirrorPoint - x, y)
color = getColor(bottomPixel)
setColor(topPixel, color)
explore(file)
def waffle():
canvas = makeEmptyPicture(100,100((yellow))
for x in range(canvas):
for y in range(canvas):
newColor=pickAColor()
width=getWidth(picture)
pixels=getPixels(picture)
setColor(pixels[x,y], newColor)
setColor(pixels[x + 1,y + 1], newColor)
setColor(pixels[x + 2,y + 2], newColor)
setColor(pixels[x + 3,y + 3], newColor)
setColor(pixels[x + 4,y + 4], newColor)
setColor(pixels[x + 5,y + 5], newColor)
setColor(pixels[x + 6,y + 6], newColor)
setColor(pixels[width], newColor)
setColor(pixels[2 * width], newColor)
setColor(pixels[2 * width + 7], newColor)
setColor(pixels[3 * width], newColor)
setColor(pixels[3 * width + 7], newColor)
setColor(pixels[4 * width], newColor)
setColor(pixels[4 * width + 7], newColor)
setColor(pixels[5 * width], newColor)
setColor(pixels[5 * width + 7], newColor)
setColor(pixels[6 * width], newColor)
setColor(pixels[6 * width + 7], newColor)
setColor(pixels[6 * width + 1], newColor)
setColor(pixels[6 * width + 2], newColor)
setColor(pixels[6 * width + 3], newColor)
setColor(pixels[6 * width + 4], newColor)
setColor(pixels[6 * width + 5], newColor)
setColor(pixels[6 * width + 6], newColor)
repaint(picture)
Revise this Paste