draftgeoutils.linear_algebra Namespace Reference

Functions

def determinant (mat, n)
 
def linearFromPoints (p1, p2)
 

Function Documentation

◆ determinant()

def draftgeoutils.linear_algebra.determinant (   mat,
  n 
)
Return the determinant of an N-matrix.

It recursively expands the minors.

◆ linearFromPoints()

def draftgeoutils.linear_algebra.linearFromPoints (   p1,
  p2 
)
Calculate linear equation from points.

Calculate the slope and offset parameters of the linear equation
of a line defined by two points.

Linear equation:
y = m * x + b
m = dy / dx
m ... Slope
b ... Offset (point where the line intersects the y axis)
dx/dy ... Delta x and y. Using both as a vector results
in a non-offset direction vector.