from typing import Tuple
import math


def get_perpendicular_point(
    start: tuple, end: tuple, offset=10
) -> Tuple[Tuple[float, float], Tuple[float, float]]:
    """
    https://stackoverflow.com/questions/133897/how-do-you-find-a-point-at-a-given-perpendicular-distance-from-a-line?rq=1

    :param start:
    :param end:
    :param offset:
    :return:
    """
    x1, y1 = start[0], start[1]
    x2, y2 = end[0], end[1]

    dx = x1 - x2
    dy = y1 - y2

    dist = math.sqrt((dx * dx) + (dy * dy))

    dx /= dist
    dy /= dist

    x3 = x1 + (offset * dy)
    y3 = y1 - (offset * dx)

    x4 = x1 - (offset * dy)
    y4 = y1 + (offset * dx)

    return (x3, y3), (x4, y4)