Reference · Facts, line drawings and positions
StarNumberstype
The numbers a star is drawn from. Only the temperature and the radius are needed; the rest has a stated default.
Import it
import type { StarNumbers } from "@johnmorrisdotca/wakusei-planets";
Definition
interface StarNumbers {
name?: string;
temperatureK: number;
radiusSun: number;
luminosityClass?: LuminosityClass;
rotationDays?: number;
activity?: number;
oblateness?: number;
corona?: number;
estimated?: readonly StarNumberName[];
}
Members
| Name | Type | Description |
|---|---|---|
name (optional) | string | undefined | What to call it: the picture's label. Default |
temperatureK | number | The effective surface temperature in kelvin, 1,000 to 200,000. It sets the colour. |
radiusSun | number | The radius in solar radii (the Sun is 1), above 0 and up to 5,000. It sets the size beside the Sun and the size of the rings drawn round the star. |
luminosityClass (optional) | "0" | "Ia" | "Iab" | "Ib" | "II" | "III" | "IV" | "V" | "VI" | "D" | undefined | The luminosity class: it sets how coarse the surface is (fine cells on a dwarf, a few giant cells on a supergiant, none on a white dwarf). Default |
rotationDays (optional) | number | undefined | Days for one turn at the equator, negative when it turns backwards. Left out, a slow turn is drawn and the picture says the rotation is not given. |
activity (optional) | number | undefined | How spotted it is, 0 to 1. Left out it follows the temperature and the class: none on hot stars, many on cool dwarfs and red dwarfs, few and large on giants. The spots are illustrative either way. |
oblateness (optional) | number | undefined | (equatorial radius - polar radius) / equatorial radius, 0 to 0.4. A fast spinner such as Altair is about 0.2. The star is drawn squashed, with the poles hotter than the equator (gravity darkening). Default 0. |
corona (optional) | number | undefined | The strength of the soft glow round the star, 0 to 1. Default 0.8. |
estimated (optional) | readonly StarNumberName[] | undefined | The numbers above that are estimates, not measurements (a radius worked out from brightness, say). The picture says so. |
Examples
import { starLook, type StarNumbers } from "@johnmorrisdotca/wakusei-planets";
const betelgeuse: StarNumbers = { name: "Betelgeuse", temperatureK: 3600, radiusSun: 760, luminosityClass: "Ia", rotationDays: 2100 };
console.log(starLook(betelgeuse).colour);#ffc392What it prints (run when this page was built)