There's an ancient belief that, just before it dies, the mute swan bursts into beautiful song, going out in a blaze of glory. While stars don't exactly make audible sounds, their death throes can be a spectacular thing.
Take this image of the Butterfly, or Bug, Nebula, NG 6302, located 3,800 light years away in the constellation of Scorpius, originally captured by the Hubble space telescope in 2009. It is a type of nebula called a bipolar nebula, for its shape: two wings that that spread out from a central core -- a dying star.
As a star enters the final stages of its life, finally running out of nuclear fuel, it sheds its outer layers into space, forming a cloud of matter around the star, which becomes very dense, very hot and very bright -- a white dwarf. This lights up the surrounding nebula in all its glory.
The white dwarf at the centre of NG 6302 is one of the hottest stars in the Milky Way galaxy, burning at around 222,000 degrees Celsius (400,000 degrees Fahrenheit), indicating that it was once massive -- five times the mass of our Sun.
This star shed its layers over a period of about 2,200 years, and has a "wingspan" of over three light years. Wrapped around the star, you can see a torus -- a donut-shape -- of dust, obscuring it, and cinching the "waist" of the hourglass. This ring of dust constricts the outward expansion of the nebula, giving it its shape.
The colours and shapes in the nebula's wings reveal its complex history. As it evolved into a red giant, with a diameter 1,000 times that of the Sun, the star started shedding its outer layers. At its equator, matter was ejected at a relatively low speed of around 32,000 kph (20,000 mph), while matter from the stars poles was ejected at a much higher speed; this formed the original dust torus and wings of the nebula.
As the star started to turn into a white dwarf, heating up drastically, the stellar wind blasted particles at a speed of around 3.2 million kph (2 million mph), further altering the shape and composition of the wings.
The red regions in the image indicate the presence of nitrogen, the coolest gas visible in the image. White regions indicate light emitted by sulphur, where the fast-moving gas and particles from later in the star's death cycle overtook and collided with the slower-moving gas, producing shockwaves. Hydrogen is visible in brown, helium in blue and oxygen in cyan and purple.