RenderableConstellationBounds

Inherits Renderable

This Renderable type can be used to draw bounding shapes on the night sky, where each shape encapsulates a group of night sky objects, such as the stars of a constellation.

The shapes are defined in a file where each line specifies a vertex location in RA Dec coordinates on the celestial sphere. Each coordinate must also be marked with an abbreviation for the corresponding constellation that the shapes encapsulates. This gives each line the following order: RA Dec Abbreviation. The units for the coordinate values are hours for RA, and degrees for Dec. An example of a line corresponding to a vertex location may look like this: 23.5357132 +35.1897736 AND, where AND is the identifier of the constellation. In this case it is short for Andromeda.

The abbreviations act as identifiers of the individual constellations and can be mapped to full names in the optional NamesFile. The names in this file are then the ones that will show in the user interface, for example. A line in the file should first include the abbreviation and then the full name. For example, for the AND abbreviation in the example above, the line would look like this: AND Andromeda.

If labels were added, the full names in the NamesFile may also be used for the text of the labels. Note that labels are added using a different file, where each line may or may not include an identifier for that specific label, marked by id in the file. If a row in the label file has an id that matches the abbreviation of the constellation, the text of that label is replaced with the full name from the NamesFile.

Members

Name

Documentation

Type

Description

Optional

File

A file that contains the vertex locations of the constellations bounds, as RA Dec coordinates on the celestial sphere.

File

Value of type ‘File’

No

Color

The color of the lines.

Color3

Value of type ‘Color3’

Yes

Labels

The labels for the constellations.

Table

LabelsComponent

Yes

LineWidth

The line width used for the constellation shape.

Double

Value of type ‘Double’

Yes

NamesFile

Specifies the file that contains the mapping between constellation abbreviations and full names of the constellations. If this value is empty, the abbreviations are used as the full names.

File

Value of type ‘File’

Yes

Selection

A list of constellations (given as abbreviations) to show. If empty or excluded, all constellations will be shown.

Table

Table parameters

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere.

Boolean

Value of type ‘Boolean’

Yes

Enabled

Determines whether this object will be visible or not.

Boolean

Value of type ‘Boolean’

Yes

Opacity

This value determines the opacity of this renderable. A value of 0 means completely transparent.

Double

In range: ( 0,1 )

Yes

RenderBinMode

A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker rendering step.

String

In list { Background, Opaque, PreDeferredTransparent, Overlay, PostDeferredTransparent, Sticker }

Yes

Tag

A single tag or a list of tags that this renderable will respond to when setting properties.

Table, or String

Value of type ‘Table’, or Value of type ‘String’

Yes

Type

The type of the renderable.

String

Value of type ‘String’

Yes

Table parameters for Selection

A list of constellations (given as abbreviations) to show. If empty or excluded, all constellations will be shown.

  • Optional: Yes

Name

Documentation

Type

Description

Optional

*

String

Value of type ‘String’

Yes

Asset Examples

 1local coreKernels = asset.require("spice/core")
 2
 3
 4
 5local data = asset.resource({
 6  Name = "Constellation Files",
 7  Type = "HttpSynchronization",
 8  Identifier = "digitaluniverse_constellations_data",
 9  Version = 1
10})
11
12
13local zodiacs = {
14  "CNC", "TAU", "PSC", "ARI", "LIB", "AQR", "CAP", "SCO", "VIR", "SGR", "GEM", "LEO"
15}
16
17local Object = {
18  Identifier = "ConstellationBounds",
19  Renderable = {
20    Type = "RenderableConstellationBounds",
21    Enabled = false,
22    File = data .. "bound_20.dat",
23    NamesFile = data .. "constellations.dat",
24    Color = { 0.45, 0.44, 0.30 }
25    -- Selection = zodiacs
26  },
27  Transform = {
28    Rotation = {
29      Type = "SpiceRotation",
30      SourceFrame = coreKernels.Frame.J2000,
31      DestinationFrame = coreKernels.Frame.Galactic
32    },
33    Scale = {
34      Type = "StaticScale",
35      Scale = 10e17
36    }
37  },
38  Tag = { "du_grid" },
39  GUI = {
40    Name = "Constellation Boundaries",
41    Path = "/Milky Way/Constellations",
42    Focusable = false,
43    Description = [[As a continent is divided into countries, astronomers divide the sky
44      into 88 regions called constellations. Every object falls into one of these 88
45      regions. The boundaries of these regions are shown in this asset. Use these in
46      concert with the constellation labels. Census: 88 constellations.]]
47  }
48}
49
50
51asset.onInitialize(function()
52  openspace.addSceneGraphNode(Object)
53end)
54
55asset.onDeinitialize(function()
56  openspace.removeSceneGraphNode(Object)
57end)
58
59asset.export(Object)
60
61
62
63asset.meta = {
64  Name = "Constellation Bounds",
65  Description = Object.GUI.Description,
66  Author = "Brian Abbott (AMNH)",
67  URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
68  License = "AMNH Digital Universe"
69}