A Computational Framework for Multilevel Morphologies