An algorithm to obtain a theoretical model of the bronchial tree