Part 1
$S\subseteq\mathbb R^2$ is locally convex, in the sense that, for any point $x\in\mathbb R^2,$ there exists an open ball $B(x,\epsilon)$, such that $S\cap B$ is convex. Show that $S$ is convex.
This part seems easy. Here I would present a sketch of the proof. First take two balls $B_1$, $B_2$, such that their intersection with $S$ is convex and $(B_1\cap S)\cap (B_2\cap S)\neq\emptyset$. It is not hard to see that $(B_1\cap S)\cap (B_2\cap S)$ is convex and $(B_1\cap S)\cup (B_2\cap S)$ is convex. Since $\mathbb R^2$ must be covered by countable many balls, we can safely use induction to obtain our result.
Part 2
$S\subseteq\mathbb R^2$ is a set satisfying that, for any point $x\in\mathbb R^2,$ there exists an open ball $B(x,\epsilon)$, such that: either 1) $S\cap B$ is convex, or 2) $S^c\cap B$ is convex. Is it possible to show that either $S$ is convex, or $S^c$ is convex?
However the part 2 seems usually hard and I don't know what to do. Maybe we could start with two intersecting epsilon ball $B_1,B_2$. Then they must both satisfy the condition (1), or they must both satisfy the condition (2)?