pioneerspacesim/pioneer — pull request #1459 by Ae-2222 (2012-08-30 00:49:27+00:00)
Title: Stars with flattening due to fast rotation (ellipsoids)

This implements ellipsoid surfaces. Comments for GetHeight in TerrainHeightEllipsoid.cpp give details and outline the algorithm. This will enable custom systems such as Achenar (#1452) to have stars with equatorial bulging.

A new field for lua custom systems is created: equatorial_to_polar_radius_aspect_ratio(f(n,n)). This defines the aspect ratio which is how flattened the ellipsoid surface is.

This adds a new file: /terrain/TerrainHeightEllipsoid.cpp.

Notes:
* Sysgen should create some stars with equatorial bulges. If anyone has any scientific data on the observed distribution of equatorial bulges or distribution of rotational speeds and any correlation by star type/mass, it would be welcome.

* The radius used to scale the model is now separate from the SystemBody radius and is equal to the Polar radius. This should be kept in mind in case there are disparities, which should be simple enough to fix (JohnJ has ok-ed the concept..and issues with regards to pressure/atmospheres etc. are not applicable for stars, but you never know).

@s20dan: this is probably of interest to you..