Skip to the content

Hoshi Stars星

The stars you can see without a telescope, with names, colours and distances; the 88 constellations with their lines and boundaries; the Messier objects; and seven map projections to draw them on.

Hoshi is the Japanese word 星 for a star. About the name

Contents

Reference · The Milky Way: a brightness map and soft bands to draw

milkyWayBandsfunction

The Milky Way cut at some brightness levels, as ribbons of sky points for drawing soft bands (a polygon per strip, filled with a low opacity so the levels build up). Each strip runs along the galactic equator; a dust lane that splits the band ends the strips on either side of it, so the lane shows as a gap. The points are in right ascension and declination, ready for project from @johnmorrisdotca/hoshi-stars/projection; a strip crossing a map's seam or the far side is the caller's to cut (compare the longitudes of neighbouring points).

Import it

import { milkyWayBands } from "@johnmorrisdotca/hoshi-stars/milky-way";

Definition

function milkyWayBands(levels?: readonly number[], options?: MilkyWayBandsOptions): MilkyWayBand[]

Parameters

NameTypeDescription
levels (optional)readonly number[]

Levels from 0 to 1, as milkyWayBrightness measures them. Default [0.2, 0.42, 0.68]: the glow, the band and the core. Each must be a number above 0 and below 1.

options (optional)MilkyWayBandsOptions

step: degrees of longitude between points along a strip (a multiple of 0.5, default 1).

Returns

MilkyWayBand[]

One band per level, in the order given.

Examples

import { milkyWayBands } from "@johnmorrisdotca/hoshi-stars/milky-way";
import { project } from "@johnmorrisdotca/hoshi-stars/projection";

for (const band of milkyWayBands()) {
  for (const strip of band.strips) {
    const polygon = [...strip.upper, ...strip.lower.slice().reverse()].map((p) => project("hammer", p, { centre: { rightAscension: 0, declination: 0 } }));
    console.log(band.level, polygon.length);
  }
}
0.2 4
0.2 4
0.2 4
0.2 2
0.2 4
0.2 2
0.2 4
0.2 6
0.2 4
0.2 4
0.2 6
0.2 4
0.2 6
0.2 4
0.2 2
0.2 4
0.2 4
0.2 4
0.2 4
0.2 4
0.2 18
0.2 2
0.2 4
0.2 2
0.2 4
0.2 54
0.2 4
0.2 10
0.2 36
0.2 4
0.2 4
0.2 4
0.2 2
0.2 4
0.2 4
0.2 20
0.2 4
0.2 4
0.2 20
0.2 2
0.2 4
0.2 2
0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HubMade from the source of @johnmorrisdotca/hoshi-stars 0.7.0.