Non-constant continuous map from $\mathbb{R}P^2$ to $\mathbb{R}$ Give an example of non-constant continuous map from $\mathbb{R}P^2$ to $\mathbb{R}$.

My attempt: Since $\mathbb{R}P^2$ is closed unit disc with antipodal points of the boundary identified. I will restrict the projection map from $\mathbb{R}^2$ to $\mathbb{R}$ to closed unit disc. then can i use this to get the required map.
Try $[x : y : z] \mapsto \frac{x^2}{x^2+y^2+z^2}.$
Indentify $\mathbb{R}^2$ by $\mathbb{C}$ and consider the map $\nu\colon \mathbb{C}\longrightarrow \mathbb{R}$ which takes $z$ to its norm $\nu(z)=|z|$.