�
��g�) � � � d Z ddlmZ ddlmZ ddlmZmZ ddlm Z m
Z
ddlmZm
Z
ddlmZmZmZmZmZ ddlmZ dd lmZ dd
lmZ ddlmZ G d� d
e
� � ZdS )z4Parabolic geometrical entity.
Contains
* Parabola
� )�S)�ordered)�_symbol�symbols)�GeometryEntity�GeometrySet)�Point�Point2D)�Line�Line2D�Ray2D� Segment2D�LinearEntity3D)�Ellipse)�sign)�simplify)�solvec �� � e Zd ZdZdd�Zed� � � Zed� � � Zed� � � Zed� � � Z dd
�Z
ed� � � Zed� � � Zd
� Z
ed� � � Zed� � � ZdS )�Parabolaa� A parabolic GeometryEntity.
A parabola is declared with a point, that is called 'focus', and
a line, that is called 'directrix'.
Only vertical or horizontal parabolas are currently supported.
Parameters
==========
focus : Point
Default value is Point(0, 0)
directrix : Line
Attributes
==========
focus
directrix
axis of symmetry
focal length
p parameter
vertex
eccentricity
Raises
======
ValueError
When `focus` is not a two dimensional point.
When `focus` is a point of directrix.
NotImplementedError
When `directrix` is neither horizontal nor vertical.
Examples
========
>>> from sympy import Parabola, Point, Line
>>> p1 = Parabola(Point(0, 0), Line(Point(5, 8), Point(7,8)))
>>> p1.focus
Point2D(0, 0)
>>> p1.directrix
Line2D(Point2D(5, 8), Point2D(7, 8))
Nc �� � |rt |d�� � }nt dd� � }t |� � }|� |� � rt d� � �t j | ||fi |��S )N� )�dimr z*The focus must not be a point of directrix)r r �contains�
ValueErrorr �__new__)�cls�focus� directrix�kwargss �g/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sympy/geometry/parabola.pyr zParabola.__new__A sy � �� ��%�Q�'�'�'�E�E��!�Q�K�K�E���O�O� ����e�$�$� K��I�J�J�J��%�c�5�)�F�F�v�F�F�F� c � � dS )aX Returns the ambient dimension of parabola.
Returns
=======
ambient_dimension : integer
Examples
========
>>> from sympy import Parabola, Point, Line
>>> f1 = Point(0, 0)
>>> p1 = Parabola(f1, Line(Point(5, 8), Point(7, 8)))
>>> p1.ambient_dimension
2
r � ��selfs r �ambient_dimensionzParabola.ambient_dimensionO s � �&