Here is the output I am getting so far for prog4. I have also included ellipsoids in the output below.
Part1: Load Textures
Part2: Modulations: 1) C = Ct & A = At; 2) C = CfCt & A = At; 3) C = CfCt & A = AfAt
Part4: Sorting (Ellipsoid with earth texture has material alpha = 1)
https://drive.google.com/open?id=1QyoSQIJNSkfxxqk5QHBomf9UpfdXzeiaCheers,
Ajinkya