  Let $C$ be a non-hyperelliptic algebraic curve. It is known that its
canonical image is the intersection of the quadrics that contain it, except
when $C$ is trigonal (that is, it has a linear system of degree 3 and dimension
1) or isomorphic to a plane quintic (genus 6). In this context, we present a
method to decide whether a given algebraic curve is trigonal, and in the
affirmative case to compute a map from $C$ to the projective line whose fibers
cut out the linear system.
