  We describe an algorithm for computing certain quaternionic quotients of the
Bruhat-Tits tree for GL2(Qp). As an application, we describe an algorithm to
obtain (conjectural) equations for the canonical embedding of Shimura curves.
