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

MilkyWayTextureOptionstype

What texture to paint.

Import it

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

Definition

interface MilkyWayTextureOptions extends MilkyWayDetailOptions {
    width?: number;
    frame?: "equatorial" | "galactic";
    ramp?: readonly MilkyWayRampStop[];
}

Members

NameTypeDescription
width (optional)number | undefined

Pixels across: an even whole number from 16 to 4096 (the family's largest texture side), default 2048. The height is half of it.

frame (optional)"galactic" | "equatorial" | undefined

equatorial (the default): across is right ascension, 0 at the left edge rising to 360 at the right, and down is declination, +90 at the top to -90 at the bottom, the way a sky sphere in equatorial coordinates is mapped. galactic: across is galactic longitude and down galactic latitude, the same way round, with the Galactic centre at the left edge.

ramp (optional)readonly MilkyWayRampStop[] | undefined

The colours, at least two stops in rising order of level, the first at 0 and the last at 1. Default MILKY_WAY_NIGHT_RAMP.

detail (optional)number | undefined

0 reads the grid in straight lines between its points (the default for milkyWayBrightness). Above 0 the grid is read along smooth curves and each value is pushed away from the mean of the degree or two round it, by this much: the dust lanes come out narrower and darker and the star clouds beside them brighter, the way the eye sees them. It sharpens what the grid holds and adds no detail of its own (no noise, nothing made up). From 0 to 2; 1 is the default for milkyWayTexture.

Examples

import { milkyWayTexture, type MilkyWayTextureOptions } from "@johnmorrisdotca/hoshi-stars/milky-way";

const options: MilkyWayTextureOptions = { width: 1024, frame: "galactic", detail: 1.5 };
console.log(milkyWayTexture(options).height); // 512
512

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hoshi-stars 0.47.0.