You need to find the area of a tree. And you need to know the area of a leaf. Then what you could do is to do a Monte Carlo simulation where you place each leaf, at a 3D x,y,z location, at some arbitrary angle, and find the projected area. Then you can make a correspondence between number of leaves and area fraction. Essentially a lookup table. Then to find the number of leaves for a certain area fraction, use find() to just look it up.