def split_bezier(bpoints, t):
def split_bezier_recursion(bpoints_left_, bpoints_right_, bpoints_, t_):<EOL><INDENT>if len(bpoints_) == <NUM_LIT:1>:<EOL><INDENT>bpoints_left_.append(bpoints_[<NUM_LIT:0>])<EOL>bpoints_right_.append(bpoints_[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>new_points = [None]*(len(bpoints_) - <NUM_LIT:1>)<EOL>bpoints_left_.append(bpoints_[<NUM_LIT:0>])<EOL>bpoints_right_.append(bpoints_[-<NUM_LIT:1>])<EOL>for i in range(len(bpoints_) - <NUM_LIT:1>):<EOL><INDENT>new_points[i] = (<NUM_LIT:1> - t_)*bpoints_[i] + t_*bpoints_[i + <NUM_LIT:1>]<EOL><DEDENT>bpoints_left_, bpoints_right_ = split_bezier_recursion(<EOL>bpoints_left_, bpoints_right_, new_points, t_)<EOL><DEDENT>return bpoints_left_, bpoints_right_<EOL><DEDENT>bpoints_left = []<EOL>bpoints_right = []<EOL>bpoints_left, bpoints_right =split_bezier_recursion(bpoints_left, bpoints_right, bpoints, t)<EOL>bpoints_right.reverse()<EOL>return bpoints_left, bpoints_right<EOL>
Uses deCasteljau's recursion to split the Bezier curve at t into two
    Bezier curves of the same order.