I have a conic section in the real projective plane. This is represented by its real symmetric 3×3 matrix. I verify that the conic section is real and non-degenerate by computing the eigenvalues of the matrix, finding that it's of full rank and indefinite, and follow a different code path if it isn't. The conic could be very close to singular though.
I can find points of the conic section by intersecting it with a line, which is easy using the matrix, or by finding a tangent incident on a point, which is easy using the inverse of the matrix.
I would like to define an arbitrary but consistent cyclic orientation of the conic, such that for any point on the conic, I can get a nonzero vector tangent to the conic and directed in some consistent direction along the conic. What is a good way to do this?
I would like a way that is numerically stable in all cases, and is not too difficult to implement. I can use a matrix library, so the method could contain matrix operations or other matrix decompositions.