Local approximation of semialgebraic sets