Skip to content

Instantly share code, notes, and snippets.

# Ilias Lahdab #PID A18504845
import math
import matplotlib.pyplot as plt
import numpy as np
def computeLineThroughTwoPoints(p1, p2):
#dummy variables to check the distance between the points using the numpy library
p1o = np.array(p1)
p2o = np.array(p2)
distance = np.sqrt(np.dot(p1o - p2o, p1o - p2o))