Friday, April 3, 2020

D3-Celestial: Better Planetary Names (and Symbols)

Another extended name feature thanks to Wikipedia: Planetary names in different languages. While at it, I also made the way Solar System bodies are displayed selectable between symbol - how they were displayed until now, letter - The first one or two letters of each body's english name, and disk, a colored circle scaled by apparent magnitude. With the last one I cheated somewhat with the Sun and the Moon so that they don't overwhelm everything else.

The above map shows all the language options for constellations and planets as well as the display options for the latter randomly changing. The relevant new options for planets are:

  planets: {  //Show planet locations, if date-time is set
    show: false,
    // 3-letter designations of all solar system objects that should be displayed
    which: ["sol", "mer", "ven", "ter", "lun", "mar", "jup", "sat", "ura", "nep", "cer", "plu"],
    // Symbols as unicode codepoints, letter abbreviations and colors to be displayed
    symbols: {
      "sol": {symbol: "\u2609", letter:"Su", fill: "#ffff00"},
      "mer": {symbol: "\u263f", letter:"Me", fill: "#cccccc"},
      "ven": {symbol: "\u2640", letter:"V", fill: "#eeeecc"},
      "ter": {symbol: "\u2295", letter:"T", fill: "#00ccff"},
      "lun": {symbol: "\u25cf", letter:"L", fill: "#ffffff"},
      "mar": {symbol: "\u2642", letter:"Ma", fill: "#ff6600"},
      "cer": {symbol: "\u26b3", letter:"C", fill: "#cccccc"},
      "ves": {symbol: "\u26b6", letter:"Ma", fill: "#cccccc"},
      "jup": {symbol: "\u2643", letter:"J", fill: "#ffaa33"},
      "sat": {symbol: "\u2644", letter:"Sa", fill: "#ffdd66"},
      "ura": {symbol: "\u2645", letter:"U", fill: "#66ccff"},
      "nep": {symbol: "\u2646", letter:"N", fill: "#6666ff"},
      "plu": {symbol: "\u2647", letter:"P", fill: "#aaaaaa"},
      "eri": {symbol: "\u26aa", letter:"E", fill: "#eeeeee"}
    // Style options for planetary symbols
    symbolStyle: { fill: "#00ccff", opacity:1, font: "bold 17px 'Lucida Sans Unicode', Consolas, sans-serif", align: "center", baseline: "middle" },
    symbolType: "symbol",  // Type of planetary symbol to be displayed: 'symbol', 'letter' or 'disk'
    names: false,  // Show name next to symbol
    // Style options for planetary names
    nameStyle: { fill: "#00ccff", font: "14px 'Lucida Sans Unicode', Consolas, sans-serif", align: "right", baseline: "top" },
    namesType: "en"  // Language in which the name is displayed, supported options:
    // (desig) 3-Letter-Designation, (ar) Arabic, (cn) Chinese, (en) English, (fr) French, (de) German, (gr) Greek, (il) Hebrew, 
    // (in) Hindi, (it) Italian, (jp) Japanese, (lat) Latin, (ru) Russian, (es) Spanish  

No comments:

Post a Comment