Closed yingma111 closed 2 years ago
def isOnArc(p: tuple, center: tuple, tanMat: np.ndarray, T: float) -> bool: """ 验证给定点p是否是以center为中心的圆上的点\n :param p: :param center: :param tanMat: :param T: :return: """ px = p[0] py = p[1] cx = center[0] cy = center[1] tan = tanMat[py][px] C = py - tan * px dist = abs(tan * cx - cy + C) / math.sqrt(1 + tan * tan) return dist < T
请问, dist = abs(tan cx - cy + C) / math.sqrt(1 + tan tan),能解释一下意义吗?
请问, dist = abs(tan cx - cy + C) / math.sqrt(1 + tan tan),能解释一下意义吗?