RenderableHabitableZone
Inherits Renderable
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The effective temperature of the corresponding star, in Kelvin. Used to compute the width and size of the disc. |
|
Value of type ‘Double’ |
No |
|
The luminosity of the corresponding star, in units of solar luminosities. Used to compute the width and size of the disc. |
|
Value of type ‘Double’ |
No |
|
The path to a file with a one-dimensional texture to be used for the disc color. The leftmost color will be innermost color when rendering the disc, and the rightmost color will be the outermost color. |
|
Value of type ‘File’ |
No |
|
The effective temperature interval for which Kopparapu’s formula is used for the habitable zone computation. For stars with temperatures outside the range, a simpler method by Tom E. Harris is used. This method only uses the star luminosity and does not include computation of the optimistic boundaries. |
|
Value of type ‘Vector2 |
Yes |
|
If true, the habitable zone disc is rendered with the optimistic boundaries rather than the conservative ones. |
|
Value of type ‘Boolean’ |
Yes |
|
The outer radius of the disc, in meters. |
|
Value of type ‘Double’ |
Yes |
|
The disc width, given as a ratio of the full disc radius. For example, a value of 1 results in a full circle, while 0.5 results in a disc where the inner radius is half of the full radius. |
|
In range: ( 0,1 ) |
Yes |
Inherited members from Renderable
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere. |
|
Value of type ‘Boolean’ |
Yes |
|
Determines whether this object will be visible or not. |
|
Value of type ‘Boolean’ |
Yes |
|
This value determines the opacity of this renderable. A value of 0 means completely transparent. |
|
In range: ( 0,1 ) |
Yes |
|
A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker rendering step. |
|
In list { Background, Opaque, PreDeferredTransparent, Overlay, PostDeferredTransparent, Sticker } |
Yes |
|
A single tag or a list of tags that this renderable will respond to when setting properties. |
|
Value of type ‘Table’, or Value of type ‘String’ |
Yes |
|
The type of the renderable. |
|
Value of type ‘String’ |
Yes |
Asset Examples
1local transforms = asset.require("./transforms")
2local textures = asset.require("scene/milkyway/habitable_zones/habitable_zone_textures")
3
4
5
6local HabitableZone = {
7 Identifier = "SunHabitableZone",
8 Parent = transforms.SunEclipJ2000.Identifier,
9 Renderable = {
10 Type = "RenderableHabitableZone",
11 Enabled = false,
12 Texture = textures.TexturesPath .. "hot_to_cold_faded.png",
13 EffectiveTemperature = 5780, -- Kelvin
14 Luminosity = 1, -- solar
15 Opacity = 0.1,
16 Optimistic = true
17 },
18 GUI = {
19 Name = "Sun's Habitable Zone",
20 Path = "/Solar System/Sun",
21 Focusable = false,
22 Description = "Habitable zone for the sun in our solar system"
23 }
24}
25
26
27asset.onInitialize(function()
28 openspace.addSceneGraphNode(HabitableZone)
29end)
30
31asset.onDeinitialize(function()
32 openspace.removeSceneGraphNode(HabitableZone)
33end)
34
35asset.export(HabitableZone)
36
37
38
39asset.meta = {
40 Name = "Sun Habitable Zone",
41 Description = [[The habitable zone around our sun, computed using formula and
42 coefficients by Kopparapu et al. (2015) https://arxiv.org/abs/1404.5292]],
43 Author = "OpenSpace Team",
44 URL = "http://openspaceproject.com",
45 License = "MIT license"
46}