# Plotting algebraic curves in the projective plane

As a follow-up to the question Are there any good computer programs for drawing (algebraic) curves?, are there any programs that can plot real algebraic curves in (a model of) the projective plane?

• I'm not sure what the point of this would be. You can tell what the points at infinity on the curve are by looking at the slopes of the asymptotes. Alternately, you can just change affine charts to look at the original curve from a different perspective. Oct 20 '10 at 21:27
• @Jack, sure you use different charts. But I'd like to see $y=x^2$ as an ellipse in a single drawing, for instance.
– lhf
Oct 20 '10 at 21:31
• If you model the projective plane as $S^2/{+-1}$ then curves are represented by their preimages on the sphere. The program "surfex" which I advertised in the earlier question has a build in function to plot intersections of hypersurfaces (e.g. a sphere and a cone). Oct 20 '10 at 21:33
– lhf
Oct 20 '10 at 22:04
• If you make the change of coordinates $z \mapsto z+y$ and $y \mapsto z-y$, the equation transforms in to $x^2 + y^2 = 1$, a circle, which you can draw in a plane viewed as a piece of the projective plane. This example seems reasonable as we get an ellipse' as we wanted. However, I think the fact that you are looking at the real locus only makes this rather artificial... Oct 21 '10 at 9:35

Three views of the (real part of the) Klein quartic $x^3y+y^3z+z^3x=0$ with Mathematica - well, two copies of it on the 2-sphere as explained in the comment by Heinrich Hartmann, that is, individual points in the projective plane are represented by pairs of diametrally opposite points on the sphere.

Of course in Mathematica you can turn it around to view from different sides.

Code:

Show[
{
Graphics3D[{Opacity[.1], Sphere[]}],
RegionPlot3D[
Abs[x^3 y + y^3 z + z^3 x] < .02 \[And] Abs[x^2 + y^2 + z^2 - 1] < .03,
{x, -1.1, 1.1}, {y, -1.1, 1.1}, {z, -1.1, 1.1},
PlotPoints -> 100, Mesh -> None
]
}
,Boxed -> False]
`

Here are a few curves on the real projective plane. https://dl.dropboxusercontent.com/u/68698001/projplot/index.html

This is the Klein quartic. The red line is the x-axis, the green line is the y-axis, and the blue line is the line at infinity.

• +1. Could you also please tell us how you generated this image? Thanks in advance! Sep 2 '15 at 19:46
• It is a ray tracer (in WebGL). The fragment shader is applied to every pixel on the canvas. Intersects the sphere with the view line associated with the pixel, applies the homogeneous polynomial x^2-y*z to the point on the sphere, sets the pixel color according to the sign of that value. I need to allow users to enter their own polynomials. Anyway, here is the elliptic curve x^3-x=y^2. dl.dropboxusercontent.com/u/68698001/projplot/index.html Sep 2 '15 at 20:44
• Thanks for adding the Klein quartic, it is very illustrative! And the affine mode is very useful too, without the doubling. Sep 3 '15 at 6:07