We present a numerical technique, namely, triangular tessellation, to calculate the free energy associated with the adsorption of a colloidal particle at a flat interface. The theory and numerical scheme presented here are sufficiently general to handle nonconvex patchy colloids with arbitrary surface patterns characterized by a wetting angle, e.g., amphiphilicity. We ignore interfacial deformation due to capillary, electrostatic, or gravitational forces, but the method can be extended to take such effects into account. It is verified that the numerical method presented is accurate and sufficiently stable to be applied to more general situations than presented in this paper. The merits of the tessellation method prove to outweigh those of traditionally used semianalytic approaches, especially when it comes to generality and applicability.