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 · A picture of each of the 88 constellations, in light and dark

figureThumbnailfunction

The picture of a figure of a sky culture (a Chinese asterism, a traditional Japanese figure), drawn the way a constellation's is, so every sky makes one set: the same square, the same room round the figure, the neighbouring constellations' boundaries and stars faint behind it, the same line and star sizes. A figure of two stars or more stands in a soft dashed outline with a faint wash (it has no official boundary: only the 88 constellations do, and the outline is a drawing aid), its stars in full. A figure of one star (Rigel as 源氏星, Sirius as 天狼, or an asterism of which the catalogue holds one star) stands in the same dashed outline round that star, ringed in the accent colour, with the neighbouring boundaries and stars faint behind it: no other figure's lines, so the picture shows only what the figure has.

Import it

import { figureThumbnail } from "@johnmorrisdotca/hoshi-stars/thumbnails";

Definition

function figureThumbnail(input: FigureThumbnailInput, options?: ThumbnailOptions): string

Parameters

NameTypeDescription
inputFigureThumbnailInput

The title, the stars and the lines.

options (optional)ThumbnailOptions

The look, the size and whether the neighbours are drawn.

Returns

string

A standalone SVG document as a string, a square of THUMBNAIL_UNITS units.

Examples

import { figureOf } from "@johnmorrisdotca/hoshi-stars/lines";
import { figureThumbnail } from "@johnmorrisdotca/hoshi-stars/thumbnails";
import { chinese } from "@johnmorrisdotca/hoshi-stars/cultures/chinese";

const dipper = figureOf("北斗", chinese);
const svg = figureThumbnail({ title: "北斗", stars: dipper.stars, segments: dipper.segments }, { theme: "dark" });
const sirius = figureOf("天狼", chinese);
console.log(svg.includes("stroke-dasharray"), figureThumbnail({ title: "天狼", stars: sirius.stars, segments: [] }).includes("data-ring"));
true true

What it prints (run when this page was built)

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