Spiral Galaxy

A Spiral Galaxy is a type of Galaxy object representing a specific spiral-type galaxy, or a new spiral galaxy created by the user. Spiral galaxies are characterized by a central bulge of older, redder stars and an extended flat disk of younger, brighter stars. The disk often exhibits a spiral structure with stars and gas concentrated in a number of bright arms curving around the galaxy. Opaque dust orbits in the regions between the spiral arms, and is responsible for the dark "dust lanes" seen when viewing spiral galaxies like the Milky Way edge-on.

Properties

 * The Galaxy Type is located in the Galaxy tab of the Galaxy's properties panel. When the type is set to one of the spiral types, the following properties will appear:
 * The Spiral Arms property determines the number of spiral arms.
 * The Pitch Angle property affects how tightly the arms are wound, and depends on the specific spiral type.
 * The Spiral Arm Noise property affects how cleanly the arms appear.
 * The appearance of an individual Galaxy Nebula object is controlled by the Gas Fraction, Star Fraction, Dust Fraction, and Average Star Temperature properties in the Nebula tab of the nebula's properties panel.

Models
The structure of a spiral galaxy is very complex compared to irregular or elliptical galaxies, and therefore requires the most complicated model. The bulge of the galaxy is simulated as an E0 elliptical galaxy, which circular but randomly oriented orbits and a low Average Star Temperature.

The orbital elements of nebulae in the disk of the galaxy are carefully calculated to orient the orbits to create the spiral arm structure according to density wave theory. The Gas Fraction, Star Fraction, and Dust Fraction of an individual Galaxy Nebula object within the galaxy varies as the nebula orbits around the galaxy, enhancing the appearance of the spiral arms as well as the dust lane when the galaxy is viewed edge-on. The Average Star Temperature of nebulae in the disk of a spiral galaxy is higher than the nebulae in the bulge, representing the recent star formation in the spiral arms that tends to create younger, hotter stars.

Spiral galaxies are simulated with the following subtypes:
 * S0: Also known as a lenticular galaxy, this type of galaxy has a central bulge and an extended disk, but does not have spiral arms. The Spiral Arms property of an S0 galaxy will automatically be set to 0. This galaxy type is simulated with a bulge that extends 30% of the way from the center to the outer radius of the galaxy.
 * Sa: Has a Pitch Angle between 10-15 degrees and a bulge that extends 25% of the way from the center to the outer radius of the galaxy.
 * Sb: Has a Pitch Angle between 15-25 degrees and a bulge that extends 20% of the way from the center to the outer radius of the galaxy.
 * Sc: Has a Pitch Angle between 25-30 degrees and a bulge that extends 15% of the way from the center to the outer radius of the galaxy.