Optimal vein density in artificial and real leaves