def split_de_casteljau(beta, t):
 beta = np.asarray(beta)
 beta_list = [beta]
 while True:
  beta = _de_casteljau1(beta, t)
  beta_list.append(beta)
  if (len(beta) == 1):
   break
 left_beta = [beta[0] for beta in beta_list]
 right_beta = [beta[(-1)] for beta in reversed(beta_list)]
 return (left_beta, right_beta)

def split_de_casteljau ( beta , t ) : beta = np . asarray ( beta ) beta_list = [ beta ] while True : beta = _de_casteljau1 ( beta , t ) beta_list . append ( beta ) if ( len ( beta ) == 1 ) : break left_beta = [ beta [ 0 ] for beta in beta_list ] right_beta = [ beta [ ( - 1 ) ] for beta in reversed ( beta_list ) ] return ( left_beta , right_beta )
split a bezier segment defined by its controlpoints *beta* into two separate segment divided at *t* and return their control points .