A method for general implementation in any software platform of the generalized Coddington equations is presented, developed, and validated within a Matlab environment. The ophthalmic lens design strategy is presented thoroughly, and the basic concepts of generalized ray tracing are introduced. The methodology for ray tracing is shown to include two inter-related processes. Firstly, finite ray tracing is used to provide the main direction of propagation of the considered ray at the incidence point of interest. Afterwards, generalized ray tracing provides the principal curvatures of the local wavefront at that point, and its orientation after being refracted by the lens. The curvature values of the local wavefront are interpreted as the sagital and tangential powers of the lens at the point of interest. The proposed approach is validated using a double-check of the calculated lens performance in the spherical lens case: while finite ray tracing is validated using a commercial ray tracing software, generalized ray tracing is validated using a software application for ophthalmic lens design based on the classical version of Coddington equations. Equations of the complete tracing process are developed in detail for the case of generic astigmatic ophthalmic lenses as an example. Three-dimensional representation of the sagital and tangential powers of the ophthalmic lens at all directions of gaze then becomes possible, and results are presented for lenses with different geometries.