In a triangle ABC, \( AB = 6 \) cm, \( BC = 8 \) cm and \( AC = 10 \) cm. A perpendicular BD is drawn from B to a point D on AC. Taking B as the centre and BD as the radius, a circle is drawn that cuts AB and BC at points E and F respectively. Find the ratio of the length of AE to that of CF.