calculating angle for children depending on number of grandchildren