Various fixes

Still does not compile. Also, the calculation of vertex positions
relative to the planet's center is obviously too sensitive with respect
to errors in the angles. Find another way to calculate them.