Let $(X,f)$ be a Belyi pair, i.e. a Riemann surface $X$ together with a morphism $f: X \to \mathbb{P}^1$, ramified only in $0,1, \infty$. Grothendieck's dessin d'enfant is the pre-image of the interval $[0,1]$ considered as a graph embedded in $X$ (a dessin d'enfant has more information than that, but let us concentrate on just the graph for the moment). What is the algorithm to compute $G$?
What I mean by algorithm is some efficient procedure that works in terms of algebraic data used to define $X$ and $f$. We may assume $X$ projective, so let $X$ be given by its homogeneous coordinate ring $R^\bullet$, specified by generators and relations, and $f$ by specified by elements of a graded $R^\bullet$-module $M^\bullet$ corresponding to the line bundle $f^*(O(-1))$.
Is there an algorithm that computes the adjacency matrix of $G$ in terms of these data?