| Server IP : 93.86.61.54 / Your IP : 216.73.216.156 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/mpl_toolkits/mplot3d/__pycache__/ |
Upload File : |
o
�:�a� � @ s� d Z ddlZddlmZ dd� Z ddd�Zdd� Zd d
� Zdd� Z d
d� Z
dd� Zdd� Zdd� Z
dd� ZeZdd� Zdd� Zdd� Zdd� ZdS ) z,
Various transforms used for by the 3D code
� Nc C s� |d | d }|d | d }t �|d �| d }t �|d �| d }|| || |d |d }t �|dd�}t �||| ||| �}|S )z�
Return the distance(s) from line defined by p1 - p2 to point(s) p0.
p0[0] = x(s)
p0[1] = y(s)
intersection point p = p1 + u*(p2-p1)
and intersection point lies within segment if u is between 0 and 1
r � � )�np�asarray�clip�hypot) �p1�p2�p0�x21�y21�x01�y01�u�d� r �=/usr/lib/python3/dist-packages/mpl_toolkits/mplot3d/proj3d.py�_line2d_seg_dist s r c
C s� || }|| }|| } |dur!|\}
}}||
}|| }| | } t �d| dd| | gdd| d| | gddd| | | gg d�g�S )z�
Produce a matrix that scales homogeneous coords in the specified ranges
to [0, 1], or [0, pb_aspect[i]] if the plotbox aspect ratio is specified.
Nr r �r r r r �r �array)
�xmin�xmax�ymin�ymax�zmin�zmax� pb_aspect�dx�dy�dz�ax�ay�azr r r �world_transformation s
�r$ c C s� | | }|t j�|� }t �||�}|t j�|� }t �||�}|d |d |d dg|d |d |d dg|d |d |d dgg d�g}ddd| d gddd| d gddd| d gg d�g}t �||�S )Nr r r r )r �linalg�norm�cross�dot)�E�R�V�nr �v�Mr�Mtr r r �view_transformation6 s
��r0 c C sJ | | | | }d| | | | }t �g d�g d�dd||gg d�g�S )N����r r r r )r r r r r )r r ���r r ��zfront�zback�a�br r r �persp_transformationV s
�r9 c C s: | | }| | }t �g d�g d�g d�dd||gg�S )N)r r r r )r r r r )r r r1 r r r r4 r r r �ortho_transformation_ s
�r: c C sF t �|| �}|d }|d | |d | |d | }}}|||fS �N� r r r )r r( )�vec�M�vecw�w�txs�tys�tzsr r r �_proj_transform_veci s (
rD c C s� t �|| �}|d }|d | |d | |d | }}}d|d k|d dk@ d|d k@ |d dk@ }t �|�rA|d dk }||||fS r; )r r( �any)r= r>