
    h                    N    S SK Jr  S SKJr  S SKrS SKJr   " S S5      rSS jr	g)	    )annotations)IterableN)Vec3c                  ,    \ rS rSrSrSS jrSS jrSrg)	CSpline
   aC  
In numerical analysis, a cubic Hermite spline or cubic Hermite interpolator
is a spline where each piece is a third-degree polynomial specified in
Hermite form, that is, by its values and first derivatives at the end points
of the corresponding domain interval.

Source: https://en.wikipedia.org/wiki/Cubic_Hermite_spline
c                4    Xl         X l        X0l        X@l        g )Np0p1m0m1)selfr   r   r   r   s        D/var/www/html/env/lib/python3.13/site-packages/ezdxf/math/cspline.py__init__CSpline.__init__   s        c                    X-  nX!-  nUS-  US-  -
  S-   nU* S-  US-  -   nX2S-  -
  U-   nX2-
  nU R                   U-  U R                  U-  -   U R                  U-  -   U R                  U-  -   $ )Ng       @g      @      ?r
   )r   tt2t3h00h10h01h11s           r   pointCSpline.point   s    UV3hc!C'cCi"s("8magww}tww},tww}<tww}LLr   )r   r   r   r   N)r   r   r   r   r   r   r   r   )r   floatreturnr   )__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__ r   r   r   r   
   s    Mr   r   c              #     #    U  H5  n[         R                  " SSU5       H  nUR                  U5      v   M     M7     g 7f)Ng        r   )nplinspacer   )csplinescountcspliner   s       r   approximater.   %   s5     S#u-A--"" . s   =?)r+   zIterable[CSpline]r    zIterable[Vec3])

__future__r   typingr   numpyr)   
ezdxf.mathr   r   r.   r'   r   r   <module>r3      s$    #   M M6#r   