OwlCyberSecurity - MANAGER
Edit File: bezier.cpython-38.pyc
U ��]�; � @ s$ d Z ddlZddlmZ ddlmZ G dd� de�Zdd� Z dd � Z d d� Zdd � Ze� ddd�d1dd��ZG dd� de�Ze� ddd�d2dd��Ze�d�e� ddd�d3dd���Ze� ddd�d4dd��Zdd � Zd!d"� Ze� ddd�d5d$d%��Zd&d'� Zd(d)� Zd6d+d,�Zd-d.� Zd/d0� ZdS )7zO A module providing some utility functions regarding bezier path manipulation. � N)�Pathc @ s e Zd ZdS )�NonIntersectingPathExceptionN)�__name__� __module__�__qualname__� r r �3/usr/lib/python3/dist-packages/matplotlib/bezier.pyr s r c s� || || }|| || } || } }|| }} | | || � t �� �dk r^td��| | }}| | }}� fdd�||||fD �\}}}}|| || }|| || }||fS )z� Return the intersection between the line through (*cx1*, *cy1*) at angle *t1* and the line through (*cx2, cy2) at angle *t2*. g�-���q=zcGiven lines do not intersect. Please verify that the angles are not equal or differ by 180 degrees.c s g | ]}|� �qS r r )�.0�k�Zad_bcr r � <listcomp>* s z$get_intersection.<locals>.<listcomp>)�np�abs� ValueError)Zcx1Zcy1�cos_t1�sin_t1Zcx2Zcy2�cos_t2�sin_t2Z line1_rhsZ line2_rhs�a�b�c�dZa_Zb_Zc_Zd_�x�yr r r �get_intersection s "r c C sl |dkr| || |fS || }}| | }}|| | || | } } || | || | }}| | ||fS )z� For a line passing through (*cx*, *cy*) and having a angle *t*, return locations of the two points located along its perpendicular line at the distance of *length*. � r ) �cx�cy�cos_t�sin_tZlengthr r r r �x1�y1Zx2Zy2r r r �get_normal_points2 s r"