The generalized trajectory theory (the G-optk program) has been extended in order to make the method applicable to electron guns with curved and/or asymmetric cathodes. The object-image analysis mode has also been added. Enhanced capability of the upgraded G-optk program was demonstrated by applying the program to three electron optical systems: (a) the point cathode gun, (b) the hairpin-type cathode gun, and (c) the LEEM objective lens. The Canonical Mapping Transformation (CMT) diagrams were calculated both by direct ray tracing and by the upgraded G-optk program. In each case, it was found that the upgraded program reproduces well the results obtained by ray tracing. The generalized trajectory method has several advantages over direct ray tracing, such as substantially lighter calculation load and easy interpretation of the calculation results in terms of the optical parameters.