# HG changeset patch # User Nicolas Saunier # Date 1275092745 14400 # Node ID eb78c6edc0c8d57bc373851997401d3851a1a860 # Parent 9f16aee24b7e7e67f0853c5fd3cf9530cfa782db added drawing for Point diff -r 9f16aee24b7e -r eb78c6edc0c8 python/moving.py --- a/python/moving.py Wed May 19 19:47:02 2010 -0400 +++ b/python/moving.py Fri May 28 20:25:45 2010 -0400 @@ -141,6 +141,10 @@ ''' return Point(self.x-other.x, self.y-other.y) + def draw(self, options = ''): + from matplotlib.pylab import plot + plot([self.x], [self.y], 'x'+options) + def norm2Squared(self): '''2-norm distance (Euclidean distance) >>> Point(3,2).norm2Squared()