MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
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. – Jack Huizenga 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). – Heinrich Hartmann Oct 20 '10 at 21:33
@Heinrich, thanks. Please add your comment as an answer. – 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... – David Holmes 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. enter image description here enter image description here enter image description here

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


  Graphics3D[{Opacity[.1], Sphere[]}], 
   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]
share|cite|improve this answer

Here are a few curves on the real projective plane.

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.

Projective Plane As Sphere Corresponding Affine Plane

share|cite|improve this answer
Very nice, thanks. – lhf Sep 2 '15 at 19:42
+1. Could you also please tell us how you generated this image? Thanks in advance! – knsam 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. – Centrinia 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.