A fast calculation method to obtain the full-analytical frequency spectrum of a spatial triangle based on the three-dimensional (3D) affine transformation is presented. Computer-generated holograms (CGHs) of an object can then be generated rapidly using the angular spectrum for propagation. The derivation process in the theory, which has more preciseness, indicates a difference from previous methods based on affine transformations ([Appl. Opt.47, 1567 (2008)Appl. Opt.52, A290 (2013)]). The proposed method to achieve 3D transformation from an arbitrary triangle to a primitive triangle includes two steps: 3D rotation and 2D affine transformation. The overall transform matrix is given by the product of a rotation matrix and a 2D affine matrix. A modified back-face culling is also introduced based on exterior normal for correct occlusion relation. Several complex 3D objects are implemented successfully using the proposed method in numerical simulations and optical experiments. The resulting computation time demonstrates that the efficiency of the proposed method is enhanced as compared to that of previous works.