comparison 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
comparison
equal deleted inserted replaced
567:072cedc3f33d 569:0057c04f94d5
57 True 57 True
58 58
59 >>> predictPositionNoLimit(10, Point(0,0), Point(1,1)) # doctest:+ELLIPSIS 59 >>> predictPositionNoLimit(10, Point(0,0), Point(1,1)) # doctest:+ELLIPSIS
60 ((1.0...,1.0...), (10.0...,10.0...)) 60 ((1.0...,1.0...), (10.0...,10.0...))
61 61
62 >>> segmentIntersection(Point(0,0),Point(1,1), Point(0,1), Point(1,2)) 62 >>> segmentIntersection(Point(0,0), Point(0,1), Point(1,1), Point(2,3))
63 >>> segmentIntersection(Point(0,1),Point(1,0), Point(0,2), Point(2,1)) 63 >>> segmentIntersection(Point(0,1), Point(0,3), Point(1,0), Point(3,1))
64 >>> segmentIntersection(Point(0,0),Point(2,0), Point(1,-1),Point(1,1)) 64 >>> segmentIntersection(Point(0,0), Point(2,2), Point(0,2), Point(2,0))
65 (1.000000,0.000000) 65 (1.000000,1.000000)
66 >>> segmentIntersection(Point(0,1),Point(2,0),Point(1,1),Point(1,2)) 66 >>> segmentIntersection(Point(0,1), Point(1,2), Point(2,0), Point(3,2))
67
68 >>> left = [(92.291666666666686, 102.99239033124439), (56.774193548387103, 69.688898836168306)]
69 >>> middle = [(87.211021505376351, 93.390778871978512), (59.032258064516128, 67.540286481647257)]
70 >>> right = [(118.82392473118281, 115.68263205013426), (63.172043010752688, 66.600268576544309)]
71 >>> alignments = [left, middle, right]
72 >>> getSYfromXY(73, 82, alignments)
73 [1, 0, 73.81997726720346, 81.10617000672484, 18.172277808821125, 18.172277808821125, 1.2129694042343868]
67 74
68 >>> Trajectory().length() 75 >>> Trajectory().length()
69 0 76 0
70 >>> t1 = Trajectory([[0.5,1.5,2.5],[0.5,3.5,6.5]]) 77 >>> t1 = Trajectory([[0.5,1.5,2.5],[0.5,3.5,6.5]])
71 >>> t1.length() == 3. 78 >>> t1.length() == 3.