Skip to the content

Wakusei Planets惑星

The Sun, the planets and their moons as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, tilt and rotation, and the moons where they are at any date and time.

Wakusei is the Japanese word 惑星 for a planet. About the name

Contents

Reference · Facts, line drawings and positions

lineSvgfunction

A body as a line drawing, as an SVG string: the outline (squeezed by its flattening and leaning at its axial tilt), bands and features, rings with their gaps, and the dark side dashed off. Give it a time to draw the body as the Earth sees it then; leave it out for a portrait. moons: true draws a planet with its moons on their orbits.

Import it

import { lineSvg } from "@johnmorrisdotca/wakusei-planets";

Definition

function lineSvg(id: BodyId, options?: LineOptions): string

Parameters

NameTypeDescription
idBodyId

The body's name: sun, a planet or a moon.

options (optional)LineOptions

The size, the pose (tilt, pitch, phase, spin or a time), moons, fill, the language and the colours.

Returns

string

The SVG markup, <svg ...> to </svg>.

Examples

import { lineSvg } from "@johnmorrisdotca/wakusei-planets";

const svg = lineSvg("saturn", { size: 320 });
console.log(svg.startsWith("<svg"), svg.includes("Saturn"));
true true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/wakusei-planets 0.24.0.