diff python/tests/moving.txt @ 92:a5ef9e40688e

makes use of matplotlib function to test if point is in a polygon
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Sun, 12 Jun 2011 03:24:55 -0400
parents daa05fae1a70
children 9928c2fa72cc
line wrap: on
line diff
--- a/python/tests/moving.txt	Thu Jun 09 16:03:17 2011 -0400
+++ b/python/tests/moving.txt	Sun Jun 12 03:24:55 2011 -0400
@@ -1,4 +1,5 @@
 >>> from moving import *
+>>> import numpy as np
 
 >>> Interval().empty()
 True
@@ -35,7 +36,7 @@
 True
 >>> t1[1]
 (1.500000,3.500000)
->>> t1.getTrajectoryInPolygon1([Point(0,0),Point(4,0),Point(4,3),Point(0,3)])
+>>> t1.getTrajectoryInPolygon(np.array([[0,0],[4,0],[4,3],[0,3]]))
 (0.500000,0.500000)
 
 >>> indic1 = TemporalIndicator('bla', [0,3,-4], TimeInterval(4,6))