Quite easy for understand and do not needs information about gradient procedure. Checks if vector inside the ball, and if not - projects on simplex mirrored to R+^n vector v, and then mirror it back ...