diff python/tests/moving.txt @ 569:0057c04f94d5

work in progress on intersections (for PET)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 06 Aug 2014 17:53:38 -0400
parents a3add9f751ef
children a9c1d61a89b4
line wrap: on
line diff
--- a/python/tests/moving.txt	Tue Aug 05 17:45:36 2014 -0400
+++ b/python/tests/moving.txt	Wed Aug 06 17:53:38 2014 -0400
@@ -59,11 +59,18 @@
 >>> predictPositionNoLimit(10, Point(0,0), Point(1,1)) # doctest:+ELLIPSIS
 ((1.0...,1.0...), (10.0...,10.0...))
 
->>> segmentIntersection(Point(0,0),Point(1,1), Point(0,1), Point(1,2))
->>> segmentIntersection(Point(0,1),Point(1,0), Point(0,2), Point(2,1))
->>> segmentIntersection(Point(0,0),Point(2,0), Point(1,-1),Point(1,1))
-(1.000000,0.000000)
->>> segmentIntersection(Point(0,1),Point(2,0),Point(1,1),Point(1,2))
+>>> segmentIntersection(Point(0,0), Point(0,1), Point(1,1), Point(2,3))
+>>> segmentIntersection(Point(0,1), Point(0,3), Point(1,0), Point(3,1))
+>>> segmentIntersection(Point(0,0), Point(2,2), Point(0,2), Point(2,0))
+(1.000000,1.000000)
+>>> segmentIntersection(Point(0,1), Point(1,2), Point(2,0), Point(3,2))
+
+>>> left = [(92.291666666666686, 102.99239033124439), (56.774193548387103, 69.688898836168306)]
+>>> middle = [(87.211021505376351, 93.390778871978512), (59.032258064516128, 67.540286481647257)]
+>>> right = [(118.82392473118281, 115.68263205013426), (63.172043010752688, 66.600268576544309)]
+>>> alignments = [left, middle, right]
+>>> getSYfromXY(73, 82, alignments)
+[1, 0, 73.81997726720346, 81.10617000672484, 18.172277808821125, 18.172277808821125, 1.2129694042343868]
 
 >>> Trajectory().length()
 0