Distances inducing the same topology but with different balls

Let $$ X=\bigcup_{n=1}^\infty\{(x,y)\in\mathbb{R}^2:x^2+y^2=n^{-2}\}. $$ $X$ is a union of circles of radius $1/n$. Consider the distances $d_1$ and $d_2$ coming from the equivalent norms $\|(x,y)\|_1=|x|+|y|$ and $\|(x,y)\|_2=\sqrt{x^2+y^2}$. The topologies induced by $d_1$ and $d_2$ on $X$ are the same. Balls of $d_2$ are a union of circles. Balls of $d_1$ are union of circles and pieces of other circles.


I think this is an example. Define $$f(x)=\begin{cases} Ax\sin(\ln|x|)\ \text{ if }\ x\ne0,\\ \quad\quad\quad0\quad\quad\ \ \text{ if }\ x=0,\\ \end{cases}$$

where $A$ is a sufficiently large constant. (If I figured this right, $A=e^{3\pi/2}$ is big enough.) Since $f$ is a continuous function, its graph $$X=\{(x,f(x)):x\in\mathbb R\}$$ is homeomorphic to $\mathbb R.$ The topology on $X$ is induced by the standard metric on $\mathbb R^2;$ since $X$ is homeomorphic to $\mathbb R,$ there is a funny metric $d'$ on $\mathbb R$ which induces the standard topology of $\mathbb R$ and is metrically isomorphic to $X;$ namely, $$d'(x_1,x_2)=\sqrt{(x_1-x_2)^2+(f(x_1)-f(x_2))^2}.$$ The point is that, in $X,$ the balls $B(0;r)$ are disconnected sets. To see this, consider any radius $r\gt0.$ Define $n\in\mathbb Z$ so that $$e^{-n\pi}\lt r\le e^{-(n-1)\pi}.$$ Then $(0,f(0))=(0,0)\in B(0;r)$ and $(e^{-n\pi},f(e^{-n\pi}))=(e^{-n\pi},0)\in B(0;r),$ but $(e^{-(n+\frac12)\pi},f(e^{-(n+\frac12)\pi})\notin B(0;r),$ because $$|f(e^{-(n+\frac12)\pi})|=Ae^{-(n+\frac12)\pi}\ge e^{-(n-1)\pi}\ge r.$$


Given any injective function $f:\mathbb R\to\mathbb R$ you can define a metric $d_f$ by $$d_f(x,y):=|f(x)-f(y)|.$$ Consider the function $f$ qualitatively pictured below:

f

A possible analytic expression could be $$f(x)=x+\sum_{n\in\mathbb Z} 4^{-n}\chi_{(4^{-n},2\cdot4^{-n})}+\sum_{n\in\mathbb Z} 2\cdot 4^{-n}\chi_{[2\cdot 4^{-n},4^{-(n-1)}]}$$ where the important thing is the alternation between open and closed intervals.

Consider then $$d:=d_f\qquad \text{and} \qquad d':=d_{2f}=2d_f.$$ They induce the same topologies because the collection of all balls is exactly the same, since $B^d(x,r)=B^{d'}(x,2r)$.

However if you choose any $r$ not in $\overline{f(\mathbb{R})}$ (which you can do for arbitrarily small values of $r$), the ball of center zero and radius $r$ for one metric will be a right-open interval, while for the other metric it will be a right-closed interval, therefore they are not homeomorphic.