In this paper, a general methodology is introduced for the determination of potential prototype curves used for the drawing of prehistoric wall paintings. The approach includes 1) preprocessing of the wall-paintings contours to properly partition them, according to their curvature, 2) choice of prototype curves families, 3) analysis and optimization in 4-manifold for a first estimation of the form of these prototypes, 4) clustering of the contour parts and the prototypes to determine a minimal number of potential guides, and 5) further optimization in 4-manifold, applied to each cluster separately, in order to determine the exact functional form of the potential guides, together with the corresponding drawn contour parts. The methodology introduced simultaneously deals with two problems: 1) the arbitrariness in data-points orientation and 2) the determination of one proper form for a prototype curve that optimally fits the corresponding contour data. Arbitrariness in orientation has been dealt with a novel curvature based error, while the proper forms of curve prototypes have been exhaustively determined by embedding curvature deformations of the prototypes into 4--manifolds. Application of this methodology to celebrated wall paintings excavated at Tyrins, Greece, and the Greek island of Thera manifests that it is highly probable that these wall paintings were drawn by means of geometric guides that correspond to linear spirals and hyperbolae. These geometric forms fit the drawings' lines with an exceptionally low average error, less than 0.39 mm. Hence, the approach suggests the existence of accurate realizations of complicated geometric entities more than 1,000 years before their axiomatic formulation in the Classical Ages.