Trees depicted in famous artworks across a range of styles follow the same mathematical rules as their real-life counterparts, scientists have found.