colouringArtfunction
A body as a colouring picture: thick black outlines on white (the outline 3 mm, every line inside 2.5 mm), its big features, its rings, and the Sun's rays. The picture is drawn at its centre (cx, cy) with r
millimetres for the body's radius. outline is the outline's thickness; the lines inside are 2.5 mm or, for a thinner outline, a little less.
Import it
import { colouringArt } from "@johnmorrisdotca/wakusei-planets/sheets";
Definition
function colouringArt(id: BodyId, cx: number, cy: number, r: number, outline?: number): string
Parameters
| Name | Type | Description |
|---|---|---|
id | BodyId | The body's name. |
cx | number | The centre's place, in millimetres. |
cy | number | The centre's place, in millimetres. |
r | number | The body's radius, in millimetres. |
outline (optional) | number | The outline's thickness in millimetres. Default 3. |
Returns
string
The SVG markup of the body, to put inside an <svg> measured in millimetres.
Examples
import { colouringArt } from "@johnmorrisdotca/wakusei-planets/sheets";
console.log(colouringArt("mars", 50, 50, 40).startsWith("<g"));trueWhat it prints (run when this page was built)