Skip to content

Instantly share code, notes, and snippets.

@vinipsmaker
Created October 4, 2013 18:43
Show Gist options
  • Save vinipsmaker/6830695 to your computer and use it in GitHub Desktop.
Save vinipsmaker/6830695 to your computer and use it in GitHub Desktop.
class l(object):
def __init__(self, p1, p2):
self.p1 = p1
self.p2 = p2
def __call__(self, t):
ret = list(self.p1)
for i in range(len(ret)):
ret[i] = (1 - t) * self.p1[i] + t * self.p2[i]
return tuple(ret)
linha1 = l((0, 0), (2, 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment