HOME | DD

lidarman — PythonSheep

Published: 2013-02-10 00:20:37 +0000 UTC; Views: 23; Favourites: 0; Downloads: 0
Redirect to original
Description Messing with the programming language Python, I accidentally created a sheep looking image when I plotted an intersection of sin(x/128) and sin(x/400).
Related content
Comments: 4

lidarman [2013-02-10 02:29:21 +0000 UTC]

The code, snort snort!

'''
Created on Feb 9, 2013

@author: RichM


'''

import Tkinter
import math
from Tkinter import *

win = Tkinter.Tk()
can = Tkinter.Canvas(win, width=1200, height=800, background='white')
can.pack()


def stopProg(e):
root.destroy()

root=Tk()

oldx = 50.0
oldy=oldy350*math.sin((50)/400.0))
for x in range (50,1150.0,1.0):

can.create_line(oldx,400-oldy,x,400-(350*math.sin((x+5.0)/128.0)), width = 5)
oldx=x
oldy350*math.sin((x+5.0)/400.0))

root.mainloop()

👍: 0 ⏩: 2

FeMailleTurtle In reply to lidarman [2013-02-10 03:10:04 +0000 UTC]

I do heart your sheep picture though. I wonder what else you can make. Figure out how to make a turtle!

👍: 0 ⏩: 0

FeMailleTurtle In reply to lidarman [2013-02-10 03:09:25 +0000 UTC]

Your dork is showing.

👍: 0 ⏩: 0

FeMailleTurtle [2013-02-10 00:47:48 +0000 UTC]

NERD!!!

👍: 0 ⏩: 0