def METHOD_NAME(x, u):
    pos = (x[0], x[1])
    theta = x[4]
    (cs, ss) = (shipRadius*cos(theta), shipRadius * sin(theta))
    v = [u[0] - x[2], u[1] - x[3]]
    deltaTheta = normalizeAngle(atan2(v[1], v[0]) - theta)
    if v[0]*v[0] + v[1]*v[1] >= shipDelta * shipDelta:
        if abs(deltaTheta) < shipEps:
            # accelerate forward, draw thruster on the back
            ax.add_patch(plt.Circle((pos[0] - cs, pos[1] - ss), .3 * shipRadius, color="red"))
        elif deltaTheta > 0:
            # rotate counterclockwise, draw thruster on right side
            ax.add_patch(plt.Circle((pos[0] + ss, pos[1] - cs), .3 * shipRadius, color="red"))
        else:
            # rotate clockwise, draw thruster on left side
            ax.add_patch(plt.Circle((pos[0] - ss, pos[1] + cs), .3 * shipRadius, color="red"))
    # draw ship
    ax.add_patch(plt.Circle(x[:2], shipRadius, color="yellow"))
    # draw two blue "eyes"
    ax.add_patch(plt.Circle((pos[0] + .7*shipRadius*cos(theta + .75), \
        pos[1] + .7*shipRadius*sin(theta + .75)), .2 * shipRadius, color="blue"))
    ax.add_patch(plt.Circle((pos[0] + .7*shipRadius*cos(theta - .75), \
        pos[1] + .7*shipRadius*sin(theta - .75)), .2 * shipRadius, color="blue"))