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
| Name | Type | Description |
|---|---|---|
levels (optional) | readonly number[] | Levels from 0 to 1, as |
options (optional) | MilkyWayBandsOptions |
|
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.2 4
0.2 16
0.2 4
0.2 4
0.2 8
0.2 16
0.2 6
0.2 4
0.2 4
0.2 6
0.2 4
0.2 4
0.2 4
0.2 4
0.2 2
0.2 4
0.2 4
0.2 2
0.2 4
0.2 2
0.2 4
0.2 2
0.2 4
0.2 10
0.2 4
0.2 4
0.2 4
0.2 2
0.2 4
0.2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