OwlCyberSecurity - MANAGER
Edit File: art3d.cpython-38.pyc
U ��]�i � @ sP d Z ddlZddlZddlmZmZmZm Z m ZmZ ddlmZmZmZmZ ddlmZ ddlmZ ddlmZ d d � Ze�d�dd � �Zdd� Ze�d�dd� �Zdd� ZG dd� dej�Z dTdd�Z!G dd� de j"�Z#dUdd�Z$dVdd�Z%e�d�dWdd ��Z&dXd!d"�Z'e�d�dYd#d$��Z(dZd%d&�Z)e�d�d[d'd(��Z*d\d)d*�Z+e�d�d]d+d,��Z,G d-d.� d.e�Z-d^d/d0�Z.G d1d2� d2e�Z/G d3d4� d4e/�Z0d5d6� Z1e�d�d7d8� �Z2d_d9d:�Z3d`d;d<�Z4G d=d>� d>e�Z5G d?d@� d@e�Z6dadBdC�Z7G dDdE� dEe�Z8dbdFdG�Z9dHdI� Z:dJdK� Z;dLdM� Z<e�d�dNdO� �Z=dPdQ� Z>e�d�dRdS� �Z?dS )czx Module containing 3D artist code and functions to convert 2D artists into 3D versions which can be added to an Axes3D. � N)�artist�cbook�colors�lines�text�path)�LineCollection�PolyCollection�PatchCollection�PathCollection)� Normalize)�Patch� )�proj3dc C s | d d } | dkr| d } | S )�?Return the given angle normalized to -180 < *a* <= 180 degrees.ih � � ��ar r �</usr/lib/python3/dist-packages/mpl_toolkits/mplot3d/art3d.py�_norm_angle s r �3.1c C s t | �S )r )r r r r r � norm_angle s r c C s | d d } | dkr| d } | S )�=Return the given angle normalized to -90 < *a* <= 90 degrees.r �Z r r r r r �_norm_text_angle% s r c C s t | �S )r )r r r r r �norm_text_angle- s r c C sn | dkrt �d�S | dkr$t �d�S | dkr6t �d�S | dkrHt �d�S t �| �rbt| �d krb| S td ��dS )a Return a direction vector. Parameters ---------- zdir : {'x', 'y', 'z', None, 3-tuple} The direction. Possible values are: - 'x': equivalent to (1, 0, 0) - 'y': equivalent to (0, 1, 0) - 'z': equivalent to (0, 0, 1) - *None*: equivalent to (0, 0, 0) - an iterable (x, y, z) is returned unchanged. Returns ------- x, y, z : array-like The direction vector. This is either a numpy.array or *zdir* itself if *zdir* is already a length-3 iterable. �x)r r r �y)r r r �z)r r r N)r r r � z2'x', 'y', 'z', None or vector of length 3 expected)�np�array�iterable�len� ValueError��zdirr r r �get_dir_vector3 s r( c @ s: e Zd ZdZddd�Zddd�Zejd d � �Zdd� Z d S )�Text3Da� Text object with 3D position and direction. Parameters ---------- x, y, z The position of the text. text : str The text string to display. zdir : {'x', 'y', 'z', None, 3-tuple} The direction of the text. See `.get_dir_vector` for a description of the values. Other Parameters ---------------- **kwargs All other parameters are passed on to `~matplotlib.text.Text`. r � r c K s&