Examples and process for working with Gauss Topology

Before starting make sure that the notebook GaussTopology2015.nb has been evaluated.  In particular the letters in GaussCurve below should be black.

For the first example I start with a singular Gauss Curve

f1=GaussCurve[z^4-3z^3+5z^2]

Since QPlot without the extra argument uses a random rectangular coordinate system we plot f1 several times until we get a nice plot, paying particular attention to the singularity.

QPlot[f1,4,X]

Using the "good" coordinate system gvv[769] we attempt a GPlot. Gauss claimed that a Gauss Curve of degree n will have n components and n infinite points.

GPlot[f1,4,X,gvv[769]]

This decomposition appears correct, note that infinite points are counted projectively which means an infinite point is identified with its antipodal point.  We now convert to data.

L=GData[f1,4,X,gvv[769]]

The number of points defining this decomposition is

Length[Flatten[L,1]]

We plot again to check the last computation specifying the order of colors so we can identify the components.

GListPlot[f1,L,{Blue,Green,Purple,Orange}]

Since we want our plot to look nice we refine all components and plot again.

Do[K[i]=RefineComponent[f1,L[[i]],X],{i,4}];
K[0]=Table[K[i],{i,4}];
GListPlot[f1,K[0],{Blue,Green,Purple,Orange}]

Component 1 looks nice, but we will refine the others again and switch colors so that the blue and purple do not touch.

K[2]=RefineComponent[f1,K[2],X];
K[3]=RefineComponent[f1,K[3],X];
K[4]=RefineComponent[f1,K[4],X];
K[0]=Table[K[i],{i,4}];
GListPlot[f1,K[0],{Blue,Green,Orange,Purple}]

We have a nice final plot! But now we have about 3 times as many points.

Length[Flatten[K[0],1]]

A nice set of difficult examples is given by the Newton Hyperbolas.  Newton called curves with asymptotes “hyperbolas” and these examples were inspired by the work of Newton and the 20th century mathematician Oleg Viro.   You should initialize the following closed cell:

NewtonHyperbola[n_]:=Module[{v,c,k,n2dig,s,maxn},
maxn=2097151; (*set maxn=1023 for cubics 32767 for quartics, 2097151 for quintics *)
If[(n> maxn) ||(n<0), Print["n out of range"];Return[Fail]];
v={{0,0},{1,0},{0,1},{2,0},{1,1},{0,2},{3,0},{2,1},{1,2},{0,3},{4,0},{3,1},{2,2},{1,3},{0,4},{5,0},{4,1},{3,2},{2,3},{1,4},{0,5}};
c={1,1,1,.2,1,.2,.008,.2,.2,.008,.000064,
.008,.2,.008,.000064,.2^10,.2^6,.008,.008,.2^6,.2^10};
k=Which[ n<8,3,n<64,6,n<1024 ,10,n<32768,15,True,21];
n2dig=IntegerDigits[n,2,k];
s=Reverse[n2dig];
Total[Table[(-1)^s[[i]]c[[i]]x^v[[i,1]] y^v[[i,2]],{i,k}]]
]

The syntax is NewtonHyperbola[n]    For n<8 curve is linear, for   8 ⩽ n< 64 curve is quadratic, for 64⩽n< 1024 curve is cubic, quartic for 1024 ⩽n<32768  and quintic for  n ⩾32768.

My second example is a difficult cubic.

f2=NewtonHyperbola[376]

If we feel lucky we can go directly to a GPlot

GPlot[f2,10,X]

Here there are three infinite points, this number is independent of the value of r, so we expect at least 3 components.  Try some QPlots with large r.

QPlot[f2,25,X]

I find two more components when r = 25.  But there is a piece missing in the component I originally had. Now I run GPlot and use the coordinate system gvv[108] which showed that piece

GPlot[f2,25,X,gvv[108]]

L1=GData[f2,10,X,gvv[108]]

L2=GData[f2,25,X,gvv[108]]

We can identify L2[[2]] as the beginning of the component with the missing piece.  Let p be the end.

p=L2[[2,-1]]

Locate this point in the complete L1

C1=FindComp[f2,p,L1,X]

This continues on correctly to its last point q

q=L1[[1,-1]]

Locate q in L2

C2=FindComp[f2,q,L2,X]

Then put these segments together

K2=Join[L2[[2]],Drop[L1[[1]],3],Take[C2[[2]],-2]]

Check that K2 is a complete component

GListPlot[f,K2]

The other components L2[[1]] and L2[[2]] are correct so we have the correct decomposition.

K={L2[[1]],K2,L2[[3]]};
GListPlot[f2,K,{Blue,Orange,Green}]

We only really need to refine K2 to get a nice plot.

K2=RefineComponent[f2,K2,X];
K={L2[[1]],K2,L2[[3]]};
GListPlot[f2,K,{Blue,Orange,Green}]

Example 3 :  Isolated Zeros

f3=82-20 (x^2)+2 (x^4)-34 (y^2)+2 (x^2) (y^2)+5 (y^4)
QData[f3,3,X]

Although you may want to check this further, this curve consists of only the 4 indicated isolated points.  Isolated points are not graphed.  Possibly a real curve may have no points at all.

Example 4: A badly scaled example

This example has macro and micro features which cannot be both shown on a single GPlot.  But we can still use this software to understand this interesting curve.

f4=NewtonHyperbola[1876]

Like Example 2 above we have to do some experimentation and repair to get a good graph.  Again start with GPlot as it will give some extra,  information. We will see that, unlike previous examples the RegionPlot in the background is not very helpful.

GPlot[f4,15,X]

We appear to have two bounded components, but we should have at least one unbounded component for each infinite point so a lot of the curve is missing.  In the GaussTopology2015 code there is a subroutine that can help locate other components:

tx=tangentrealpoints[f4,x,X]
ty=tangentrealpoints[f4,y,X]
Sort[Norm/@Join[tx,ty]]

All these points should be in a correct final graph.  This suggests trying some of the following r’s

QPlot[f4,30,X]

QPlot[f4,350,X]

Note that unlike previous examples RegionPlot is not very helpful, since there are no singular points (none are known for any NewtonHyperbola) the curve -f4  will have the same decomposition.  Perhaps the best view is

GPlot[-f4,30,X,gvv[593]]

Finally, using the GData for this plot we repair and refine this data and add two dashed components in topological but not geometric position to indicate the two missing components with turning points  approximately {6,-300} and {-94,1}.  This non-singular degree 4 curve has 6 affine topological components, two bounded and 4 unbounded.  (Data is in the following closed cell.)

K1
K2
K3
K4
K5
K6

GListPlot[-f4,{K1,K2,K3,K4,K5,K6},{Red,Blue,Green,Orange,Directive[Black,Dashed],Directive[Brown,Dashed]}]

Projectively the two distant vertical components connect at the infinite points as do the two distant horizontal components.  Thus projectively this curve has 4 ovals making it an M-curve in the terminology of Hilbert, Harnack and Viro.

Question :  Can you find an M-curve of degree 5 from among the Newton Hyperbolas?  It would have 7 projective ovals.  The affine version would have possibly 10 components.