Ńņ Y¬Jc @ s d Z d d k Z d d k l Z d d k l Z d d k l Z d Z d Z d Z d Z d d d d Z d d d YZ d d Z d d d d Z d e d Z d Z d Z d Z d d Z d Z d d d d Z d Z d Z d S( sO A module providing some utility functions regarding bezier path manipulation. i’’’’N( t sqrt( t Path( t xorc C sö | | | | } | | | | } | | } } | | } } | | | | } | d j o t d n | | } } | | } } g } | | | | g D] } | | | q¢ ~ \ } } } } | | | | } | | | | } | | f S( s return a intersecting point between a line through (cx1, cy1) and having angle t1 and a line through (cx2, cy2) and angle t2. g s Given lines do not intersect( t ValueError( t cx1t cy1t cos_t1t sin_t1t cx2t cy2t cos_t2t sin_t2t line1_rhst line2_rhst at bt ct dt ad_bct a_t b_t c_t d_t _[1]t kt xt y( ( s7 /usr/lib64/python2.6/site-packages/matplotlib/bezier.pyt get_intersection s =c C s | d j o | | | | f S| | } } | | } } | | | | | | } } | | | | | | } } | | | | f S( s² 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*. g ( ( t cxt cyt cos_tt sin_tt lengthR R R R t x1t y1t x2t y2( ( s7 /usr/lib64/python2.6/site-packages/matplotlib/bezier.pyt get_normal_points0 s c C s" | d d | | d | } | S( Ni’’’’i ( ( t betat tt next_beta( ( s7 /usr/lib64/python2.6/site-packages/matplotlib/bezier.pyt _de_casteljau1M s c C sµ t i | } | g } x@ t o8 t | | } | i | t | d j o Pq q Wg } | D] } | | d qf ~ } g } t | D] } | | d q ~ } | | f S( s split a bezier segment defined by its controlpoints *beta* into two separate segment divided at *t* and return their control points. i i i’’’’( t npt asarrayt TrueR) t appendt lent reversed( R&