SkyModel¶
-
class SkyModel¶
Bases:
TypedReferenceCountA planet’s air as three media (Hillaire 2020, after Bruneton & Neyret 2008), and its CPU light model: Rayleigh-scattering molecules and Mie-scattering aerosols, each thinning exponentially with height, and an ozone layer that only absorbs (a tent profile). Units are the shaders’: kilometres and 1/km. The defaults are the Earth of Hillaire’s paper.
transmittance()is the colour of the sunlight (or moonlight) after it crossed the air to a point, for aDirectionalLight;sky_irradiance()a rough irradiance of a horizontal surface by the sky (single scattering over a spread of directions, plus 40 % for the higher orders), for anAmbientLight. The native twin of acron.sky’s Atmosphere, computed in double precision; a defaultsky_irradiancetakes some 50 us.Inheritance diagram
digraph inheritance705e798c23 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "SkyModel" [URL="acron.atmosphere.SkyModel.html#acron.atmosphere.SkyModel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "SkyModel" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }- SkyModel.__init__()¶
The Earth’s air (Hillaire 2020).
Any air: radii and scale heights in km, coefficients in 1/km.
- SkyModel.extinction()¶
The extinction (1/km, rgb) at a height (km above the ground).
- static SkyModel.get_class_type()¶
- SkyModel.get_ground_albedo()¶
- SkyModel.get_ground_radius()¶
- SkyModel.get_mie_absorption()¶
- SkyModel.get_mie_g()¶
- SkyModel.get_mie_scale_height()¶
- SkyModel.get_mie_scattering()¶
- SkyModel.get_ozone_absorption()¶
- SkyModel.get_ozone_centre()¶
- SkyModel.get_ozone_width()¶
- SkyModel.get_rayleigh_scale_height()¶
- SkyModel.get_rayleigh_scattering()¶
- SkyModel.get_top_radius()¶
- SkyModel.ray_to_top()¶
The distance (km) from height_km along cos_zenith to the top of the air, or -1 when the ray meets the ground first.
- SkyModel.set_ground_albedo()¶
- SkyModel.set_ground_radius()¶
- SkyModel.set_mie_absorption()¶
- SkyModel.set_mie_g()¶
- SkyModel.set_mie_scale_height()¶
- SkyModel.set_mie_scattering()¶
- SkyModel.set_ozone_absorption()¶
- SkyModel.set_ozone_centre()¶
- SkyModel.set_ozone_width()¶
- SkyModel.set_rayleigh_scale_height()¶
- SkyModel.set_rayleigh_scattering()¶
- SkyModel.set_top_radius()¶
- SkyModel.sky_irradiance()¶
A rough irradiance (rgb) the sky gives a horizontal surface at height_km under a sun in the direction sun_up (z up) of the given illuminance: single scattering summed over
directionsupward directions (a golden spiral, uniform in solid angle) ofstepssamples each (the sunlight to each sample a 12-step transmittance), times 1.4 for the higher orders.sky_irradiance() for a white sun of this illuminance.
- SkyModel.transmittance()¶
How much light (rgb, 0..1) gets from the top of the air down to a point height_km up, arriving from cos_zenith (1: straight down from overhead); zero when the planet is in the way.
stepssteps crowded round the ray’s lowest point (optical_depth_d()).
- SkyModel.with_weather()¶
This air with haze times the aerosols (1: clear) and humidity 0..1 (wet aerosols scatter more and absorb less: hazier, whiter); haze_height >= 0 overrides the aerosols’ scale height.