@@ -45,7 +45,7 @@ def test_constructor2(self):
4545 # 2, point constructor
4646 P = np .r_ [2 , 3 , 7 ]
4747 Q = np .r_ [2 , 1 , 0 ]
48- L = Line3 .TwoPoints (P , Q )
48+ L = Line3 .Join (P , Q )
4949 nt .assert_array_almost_equal (L .w , P - Q )
5050 nt .assert_array_almost_equal (L .v , np .cross (P - Q , Q ))
5151
@@ -74,7 +74,7 @@ def test_constructor2(self):
7474
7575 def test_pp (self ):
7676 # validate pp and ppd
77- L = Line3 .TwoPoints ([- 1 , 1 , 2 ], [1 , 1 , 2 ])
77+ L = Line3 .Join ([- 1 , 1 , 2 ], [1 , 1 , 2 ])
7878 nt .assert_array_almost_equal (L .pp , np .r_ [0 , 1 , 2 ])
7979 self .assertEqual (L .ppd , math .sqrt (5 ))
8080
@@ -85,7 +85,7 @@ def test_pp(self):
8585 def test_contains (self ):
8686 P = [2 , 3 , 7 ]
8787 Q = [2 , 1 , 0 ]
88- L = Line3 .TwoPoints (P , Q )
88+ L = Line3 .Join (P , Q )
8989
9090 # validate contains
9191 self .assertTrue ( L .contains ([2 , 3 , 7 ]) )
@@ -96,7 +96,7 @@ def test_contains(self):
9696 def test_closest (self ):
9797 P = [2 , 3 , 7 ]
9898 Q = [2 , 1 , 0 ]
99- L = Line3 .TwoPoints (P , Q )
99+ L = Line3 .Join (P , Q )
100100
101101 p , d = L .closest_to_point (P )
102102 nt .assert_array_almost_equal (p , P )
@@ -107,7 +107,7 @@ def test_closest(self):
107107 nt .assert_array_almost_equal (p , Q )
108108 self .assertAlmostEqual (d , 0 )
109109
110- L = Line3 .TwoPoints ([- 1 , 1 , 2 ], [1 , 1 , 2 ])
110+ L = Line3 .Join ([- 1 , 1 , 2 ], [1 , 1 , 2 ])
111111 p , d = L .closest_to_point ([0 , 1 , 2 ])
112112 nt .assert_array_almost_equal (p , np .r_ [0 , 1 , 2 ])
113113 self .assertAlmostEqual (d , 0 )
@@ -128,7 +128,7 @@ def test_plot(self):
128128
129129 P = [2 , 3 , 7 ]
130130 Q = [2 , 1 , 0 ]
131- L = Line3 .TwoPoints (P , Q )
131+ L = Line3 .Join (P , Q )
132132
133133 fig = plt .figure ()
134134 ax = fig .add_subplot (111 , projection = '3d' , proj_type = 'ortho' )
@@ -142,9 +142,9 @@ def test_eq(self):
142142 w = np .r_ [1 , 2 , 3 ]
143143 P = np .r_ [- 2 , 4 , 3 ]
144144
145- L1 = Line3 .TwoPoints (P , P + w )
146- L2 = Line3 .TwoPoints (P + 2 * w , P + 5 * w )
147- L3 = Line3 .TwoPoints (P + np .r_ [1 , 0 , 0 ], P + w )
145+ L1 = Line3 .Join (P , P + w )
146+ L2 = Line3 .Join (P + 2 * w , P + 5 * w )
147+ L3 = Line3 .Join (P + np .r_ [1 , 0 , 0 ], P + w )
148148
149149 self .assertTrue (L1 == L2 )
150150 self .assertFalse (L1 == L3 )
@@ -155,7 +155,7 @@ def test_eq(self):
155155 def test_skew (self ):
156156
157157 P = [2 , 3 , 7 ]; Q = [2 , 1 , 0 ]
158- L = Line3 .TwoPoints (P , Q )
158+ L = Line3 .Join (P , Q )
159159
160160 m = L .skew ()
161161
@@ -165,7 +165,7 @@ def test_skew(self):
165165 def test_mtimes (self ):
166166 P = [1 , 2 , 0 ]
167167 Q = [1 , 2 , 10 ] # vertical line through (1,2)
168- L = Line3 .TwoPoints (P , Q )
168+ L = Line3 .Join (P , Q )
169169
170170 # check transformation by SE3
171171
@@ -242,7 +242,7 @@ def test_line(self):
242242 def test_contains (self ):
243243 P = [2 , 3 , 7 ]
244244 Q = [2 , 1 , 0 ]
245- L = Line3 .TwoPoints (P , Q )
245+ L = Line3 .Join (P , Q )
246246
247247 self .assertTrue ( L .contains (L .point (0 )) )
248248 self .assertTrue ( L .contains (L .point (1 )) )
@@ -251,7 +251,7 @@ def test_contains(self):
251251 def test_point (self ):
252252 P = [2 , 3 , 7 ]
253253 Q = [2 , 1 , 0 ]
254- L = Line3 .TwoPoints (P , Q )
254+ L = Line3 .Join (P , Q )
255255
256256 nt .assert_array_almost_equal (L .point (0 ).flatten (), L .pp )
257257
@@ -261,7 +261,7 @@ def test_point(self):
261261 def test_char (self ):
262262 P = [2 , 3 , 7 ]
263263 Q = [2 , 1 , 0 ]
264- L = Line3 .TwoPoints (P , Q )
264+ L = Line3 .Join (P , Q )
265265
266266 s = str (L )
267267 self .assertIsInstance (s , str )
@@ -271,10 +271,10 @@ def test_plane(self):
271271
272272 xyplane = [0 , 0 , 1 , 0 ]
273273 xzplane = [0 , 1 , 0 , 0 ]
274- L = Line3 .TwoPlanes (xyplane , xzplane ) # x axis
274+ L = Line3 .IntersectingPlanes (xyplane , xzplane ) # x axis
275275 nt .assert_array_almost_equal (L .vec , np .r_ [0 , 0 , 0 , - 1 , 0 , 0 ])
276276
277- L = Line3 .TwoPoints ([- 1 , 2 , 3 ], [1 , 2 , 3 ]); # line at y=2,z=3
277+ L = Line3 .Join ([- 1 , 2 , 3 ], [1 , 2 , 3 ]); # line at y=2,z=3
278278 x6 = [1 , 0 , 0 , - 6 ] # x = 6
279279
280280 # plane_intersect
@@ -291,9 +291,9 @@ def test_plane(self):
291291
292292 def test_methods (self ):
293293 # intersection
294- px = Line3 .TwoPoints ([0 , 0 , 0 ], [1 , 0 , 0 ]); # x-axis
295- py = Line3 .TwoPoints ([0 , 0 , 0 ], [0 , 1 , 0 ]); # y-axis
296- px1 = Line3 .TwoPoints ([0 , 1 , 0 ], [1 , 1 , 0 ]); # offset x-axis
294+ px = Line3 .Join ([0 , 0 , 0 ], [1 , 0 , 0 ]); # x-axis
295+ py = Line3 .Join ([0 , 0 , 0 ], [0 , 1 , 0 ]); # y-axis
296+ px1 = Line3 .Join ([0 , 1 , 0 ], [1 , 1 , 0 ]); # offset x-axis
297297
298298 self .assertEqual (px .ppd , 0 )
299299 self .assertEqual (px1 .ppd , 1 )
0 commit comments