Hyperplane arrangements and invariant theory