Given an algebraic map $f: B^d \to \mathbb{R}$, from the unit ball of dimension $d$ to the real, let $Y = f^{-1}(0)$. Then it is always possible to find a smaller ball $B\_r \subset B^d$ not necessarily centered at $0$, such that for all lines $l$ going through $B\_r$, $|l \cap Y| \le k$, where $k$ is the maximum degree of $f$. 


Is the analogue of this for higher codimension still true? By that I mean if $f: B^d \to \mathbb{R}^k$, $k \le d$, and q is a regular point of $f$. Then is it true that we can always find $B\_r$ such that for all affine $n$-planes going through $B\_r$, the number of intersections of the plane and $Y = f^{-1}(q)$ is bounded by the maximum degree of $f$, or perhaps some other polynomial bound depending only on the max degree of $f$? 


I feel this should be doable using basic calculus of one variables, eg. mean value theorem. But it seems complicated.



Upper bound on the number of intersections of algebraic manifolds with affine planes
Unless I misunderstood the question, here is a counter-example:
$d=3$, $k=2$, $f:\mathbb R^3\to\mathbb R^2$ is just a linear map, e.g. $f(x,y,z)=(x,y)$. Take $q=(0,0)$, then $Y=f^{-1}(q)$ is a straight line in $\mathbb R^3$.


A generic 2-plane intersects $Y$ at one point. However there are planes containing $Y$ (and hence having infinitely many intersections), moreover these planes cover the entire space. So there is no ball $B\_r$ avoided by such planes.


