The tree has three repeating parts with three different "slopes"; a top segment with slope=1, a middle segment with slope=2, and a bottom segment with slope=3.


For each row in each segment the required number of "*" and " " are calculated, using the different slopes, so that the tree is centered at position 20 along the downward axis. This is done in this part:

Transpose@{Floor[a=Flatten[-1+#{ 2, 4, 6, 8}&/@{1,2,3}];a/2]-a+20,a}~Join~{b={18,3},b}

This line gives the result

{{19,1},{18,3},{17,5},{16,7},{18,3},{16,7},{14,11},{12,15},{17,5},{14,11},{11,17},{8,23},{18,3},{18,3}}

where the list should be interpreted as

{{no. of spaces in row 1, no of * in row 1}, {no. of spaces in row 2, no of * in row 2}, ...}


Next, a list of strings is generated using the function StringRepeat[string, n] applied to each row in the above list.


Finally, each string is printed using the function Print[string] applied to to each element in the list of strings.