Learning the structure of manifolds using random projections