Recently, I have been caught in the question: What kind of algebraic curves in $\mathbb{R}^2$ can one get?

For instance, how do I know that there is no polynomial $P(x, y) \in \mathbb{R}[x, y]$ whose graph *looks like* the graph of the $y = \cos x$? My intuition is that the graph $y = \cos x$ has infinitely many turning points; which might differentiate it from graph of any polynomial. Obviously, one needs to define the meaning of "two curves that look like each other"; which is somewhat intuitive but might be very subjective. (Due to transcendence of $\cos x$, no polynomial can achieve the graph identical to that of $y = \cos x$.)

I conjectured that the compact component of any graph of polynomials in $\mathbb{R}[x, y]$ must have winding number 1 (more or less, circle-like). Unfortunately, this is easily seen to be false. Is there any known result along this direction?

I once found an equation of form $P^2 + Q^2 = 1$, along the line of $(x^2 - y + y^4)^2 + (y^2 - x - x^4)^2 = 1$, whose graph looks fairly close to a rectangle. (Of course, there can be no polynomial whose graph is a rectangle due to sharp corners. I do not know of easy formal argument for this though one can work it out by noting that such polynomial must basically be product of linear factors but then we have infinite lines in the graph.) It is suggestive that we can use higher and higher degree polynomial to *get arbitrarily close* to some (hence, arbitrary via linear change of coordinate) rectangle $R$. However, we want to exclude the case where one picks out point-by-point on the $R$ using polynomials $\prod_{a, b \in S} ((x-a)^2 + (y-b)^2)$ where $S \subset R$ finite. It is thus my wishful thinking to have a measure $\mu(\gamma, \delta)$ that measures similarity between two curves $\gamma, \delta$ on the plane.