def mag(vx, vy): return np.sqrt(powr(vx, 2) + powr(vy, 2))
def leg_poly_4(u): return 1 / (128 * np.sqrt(2)) * (384 * powr(u, 4) + 1152 * np.multiply( (powr(u, 2) - 1), powr(u, 2)) + 144 * powr((powr(u, 2) - 1), 2))
def leg_poly_5(u): return 1 / 3840.0 * np.sqrt(11 / 2) * ( 3840 * powr(u, 5) + 7200 * np.multiply(powr( (powr(u, 2) - 1), 2), u) + 19200 * np.multiply( (powr(u, 2) - 1), powr(u, 3)))
def leg_poly_2(u): return 1 / 2.0 * np.sqrt(5 / 2) * (3 * powr(u, 2) - 1)
def leg_poly_3(u): return 1 / 2.0 * np.sqrt(7 / 2) * (5 * powr(u, 3) - 3 * u)
def mag(vx,vy): return np.sqrt(powr(vx,2)+powr(vy,2))
def leg_poly_5(u): return 1/3840.0 * np.sqrt(11/2) * (3840*powr(u,5) + 7200 * np.multiply(powr((powr(u,2) - 1), 2), u) + 19200 * np.multiply((powr(u,2) - 1), powr(u,3)) );
def leg_poly_4(u): return 1/(128*np.sqrt(2)) * (384*powr(u,4) + 1152*np.multiply((powr(u,2) - 1), powr(u,2)) + 144*powr((powr(u, 2) - 1), 2) );
def leg_poly_3(u): return 1/2.0 * np.sqrt(7/2) * (5*powr(u,3) - 3*u);
def leg_poly_2(u): return 1/2.0 * np.sqrt(5/2) * ( 3*powr(u,2) - 1);