We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 85fd9cc + 392fd56 commit fa92ec6Copy full SHA for fa92ec6
Shortest Distance between Two Lines.py
@@ -0,0 +1,10 @@
1
+import math
2
+import numpy as NP
3
+
4
+LC1=eval(input("Enter DRs of Line 1 : "))
5
+LP1=eval(input("Enter Coordinate through which Line 1 passes : "))
6
+LC2=eval(input("Enter DRs of Line 2 : "))
7
+LP2=eval(input("Enter Coordinate through which Line 2 passes : "))
8
+a1,b1,c1,a2,b2,c2=LC1[0],LC1[1],LC1[2],LC2[0],LC2[1],LC2[2]
9
+x=NP.array([[LP2[0]-LP1[0],LP2[1]-LP1[1],LP2[2]-LP1[2]],[a1,b1,c1],[a2,b2,c2]])
10
+y=math.sqrt((((b1*c2)-(b2*c1))**2)+(((c1*a2)-(c2*a1))**2)+(((a1*b2)-(b1*a2))**2))
0 commit comments