We start with univariate polynomials. We assume numerical polynomials which implies, among other things, that no coefficient is exactly zero and there are no exact multiple zeros. Descartes' rule can be formulated in the following combinatorial and visual way:

Descartes' rule then counts the possible number of postive and negative zeros, that is the number of times the graph would cross the x-axis on the positive side and on the negative side. Notice the total is always the degree.
Descartes' RuleThe number of positive zeros differs from the number of times the curve in the diagram crosses the axes on the positive side by an even number but is never more than shown in the picture. Likewise the number of even zeros is bounded by the curve in the diagram and differs by an even number.
So in the first diagram there can be 3 or 1 positive zeros and must be exactly 1 negative zero for this 4th degree polynomial. In the second diagram there may be 6,4,2 or 0 positive zeros and 2 or 0 negative zeros for this 8th degree polynomial.
The 2-dimensional version of this will be called a Viro Diagram after Oleg Viro, a contemporary, to this author, Russian mathematician, who proposed this idea in 1979.
Now we have a bivariate polynomial which is a finite sum
where for each monomial aj,kxjyk the exponent is the pair {j,k} and the degree is j+k. The total degree of this polynomial is the highest degree of a monomial. The solution f(x,y) = 0 for x,y real, is no longer a set of points but a real algebraic plane curve. The goal is to now count the number of points where the curve crosses from one quadrant of the real projective plane to another where the quadrants are given, as in beginning algebra, by
except that diagonal lines here refer to the projective infinite line and a curve can cross the infinite line from quadrant I to quadrant III and quadrant II to quadrant IV, that is, a curve can cross from any quadrant to any other. We want to count each kind of crossing.
We proceed as in Descartes' rule except here we label the exponent {j,k} in quadrant I with with a green dot if the coefficient of xjyk is positive and with a red dot if the coefficient is negative. The idea of plotting the exponents on a plane lattice goes back to Newton but he used the condition 0 or not 0 on the coefficient generating the Newton Polygon which is still an important concept in computational algebra. This is extended to a plane rhombus by, as in Descartes's rule labeling {-j,k}, j,k > 0 the same as {j,k} if k is even and the opposite color. A similar rule is used for {j,-k}. For {-j,-k} use same color if j,k, have the same parity and opposite color if j,k, have opposite parity. This pattern becomes clear if we start with all positive coefficients:

Finally we consider two dots of the same color in the same component if the exponents agree in one direction and differ by 1 in the other. Following Gauss (Chapter 4 of curve book) we draw continuous curves bounding the components where the curves intersect horizontal and vertical integer lines at points {m,.5} or {.5,n} for m,n integers. For example when s= {0,1,0,0,1,0,1,1,0,0} the Viro Diagram looks like


The analogue of Descartes' Theorem for Viro Diagrams is that for a curve with the given sign sequence the number of passages from one quadrant to another is bounded by the number of passages in the corresponding Viro Diagram and differs from the diagram along each boundary by an even number (sometimes stated "agrees modulo 2").
Note that the presence of indeterminant squares does not affect the number of quadrant changes. So regardless of the choice there must be one passage from the first quadrant to the third, one or 3 from first to fourth and also third to fourth and 2 or no passages from second to fourth. In partcular a curve with this sign sequence could have the right hand choice with no oval. But, of course, the pseudo-line is required of any cubic.
It should be noted that from the two dimensional Descartes' Rule point of view only the dots on the boundary count. In fact, for the horizontal and vertical axes the analogue of the one dimensional case follows directly from that case by setting one of the variables to 0. The case of passage across the infinite line but relys on the calculation of infinite points from the maximal form fmax and replacing x by a large positive constant. The internal dots may still be useful in seeing how it is possible for the curve to look between the quadrant boundaries. Ovals of the Viro Diagram lying entirely in some quadrant may or may not exist for a specific curve with these sign changes. Actually, Viro's interest in these diagrams was the converse starting with the diagram. He was interested in knowing if a curve with the topology of the diagram could actually exist with given sign sequence. He proved that in fact such a curve does exist but did not give explicit coefficients. We cannot do that either in general, but we can in specific cases.
Newton was interested in cataloging real cubic functions [See D.J. Struik, A Source book in Mathematics 1200-1800, Princeton, 1986, pp. 162--178], he called them hypberbolas because of the asymptotes. I have generated a numbered list of approximately 228 curves up to degree 6 with many asymptotes which I call, in honor of Newton's work sometime between 1676 and 1704 on real cubics. These curves have the property that they maximize the number of quadrant changes in the Viro Diagrams of their sign sequence. In general they may not have all the ovals in the diagrams which are contained in a quadrant. Software for calculating Newton Hyperbolas, at least up to degree 4, is available on this website.
But these Newton Hyperbolas can be used as a starting point to finding a curve which does have the same topology as a Viro Diagram. We give several examples.
We start with the Viro diagram for s= {0,1,0,0,1,0,1,1,0,0} pictured above which corresponds to the sign sequence for Newton Hyperbola 210 (NH210).


However we can make the positive region smaller by making the constant term smaller, 0.3, but keeping it positive thus preserving the sign sequence. As noted above this does not change the passages across quadrants.


We now shift gears from one of the easiest examples to the hardest. When Harnack stated his curve theorem in 1876 he claimed to have maximal examples (called M curves) for each degree, i.e. a curve of degree d with (d-1)(d-2)/2+1 connected projective components. Viro gives a recipe for the diagram. Here is a slightly modified Newton Hyperbola friendly version constructed inductively by d: Begin with a green dot at {0,0}. For the next diagonal starting at {n,0} if n is odd fill the diagonal with red dots, if n is even start with a green dot and then alternate red and green ending in green. For example for d= 3,4,5,6 we have

Unfortunately, the Newton Hyperbolas which have the correct sign sequences give only the big component. These are NH982, NH11222, NH2075606, NH90155990 respectively. In the case of d=3 and d=4 it is relatively easy to modify the Newton Hyperbola to get a curve fulling matching the Viro Diagram.
For d=3 we take NH982 - 4xy =
1 - x - y + 0.2x2 - 5xy + 0.2y2 - 0.008x3 - 0.2x2y - 0.2xy2 - 0.008y3.
Comparing the Viro Diagram with a Mathematica Region Plot, again the red area of the Viro Diagram corresponds to the white area in the region plot. Also the pieces of the big component in quadrants II and IV are not shown as they are far from the plot region.
For d=4 we take NH11222 - 6xy - xy2 - x2y. Here our region plot shows the 3 finite ovals and pieces of the big curve in the first quadrant but again the third quadrant pieces of the big curve are out of the plot range. Here the 4 white areas are interiors of the ovals.
Of course these curves are not exciting as there are simpler known examples of M-curves in degree 3 and 4. I will leave it to my readers to work out explicit actuations of curves matching the Viro Diagrams for d=5,6 starting from NH2075606 and NH90155990 respecively and preserving their sign sequences. These would be exciting and I will give the first people to get a correct equation credit on my website and/or book.

