TITLE: Is there an algorithm to write down the 27 lines of a cubic surface?
QUESTION [19 upvotes]: Let $S$ be a smooth cubic surface defined by $f\in \mathbb Q[x,y,z,w]$. Is there an algorithm to write down the 27 lines on $S$? Or at least find a field extension of $\mathbb Q$ over which these lines are defined?

REPLY [7 votes]: Here is yet another place to look for an algorithm: you can find a description of how to compute homogeneous equations for the Plücker coordinates of the lines on a cubic surface in the Macaulay 2 tutorial at
http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.6/share/doc/Macaulay2/Macaulay2Doc/html/___Tutorial_co_sp__Fano_spvarieties.html.
What you will find there is essentially is the same procedure as in Jim Carlson's Sage code mentioned in the comments above, but perhaps it is a bit easier to read. The tutorial also discusses the general problem of computing equations for the Fano variety (scheme) of a projective variety.