fuzzy_set.intersection module#
This module provides utilities to compute the intersection of two lines.
- fuzzy_set.intersection.find_intersection(p1: tuple[float, float], p2: tuple[float, float], p3: tuple[float, float], p4: tuple[float, float]) tuple[float, float] | None[source]#
Computes the intersection of two lines \(D\) and \(D'\) such that:
\(D\) traverses the points \(P_1(x_1, y_1)\) and \(P_2(x_2, y_2)\) where \(x_1 \ne x_2`\);
\(D'\) traverses the points \(P_3(x_3, y_3)\) and \(P_4(x_4, y_4)\) where \(x_3 \ne x_4`\);
- Parameters:
p1 (tuple[float, float]) – The point \(P_1\).
p2 (tuple[float, float]) – The point \(P_2\).
p3 (tuple[float, float]) – The point \(P_3\).
p4 (tuple[float, float]) – The point \(P_4\).
- Returns:
The intersection point of \(D\) and \(D'\) if uniquely defined,
Noneotherwise.