This is the Help Page for Simulation of Atmospheric Refraction. It describes all parameters the user can specify. It is displayed if you click the icon on the right each control element. For a description of the simulation itself see How the Simulation works.
The values of most input fields can be changes with the Arrow Keys of the keyboard in multiple step sizes.
Place the cursor in an input field, by clicking on it. Press the Up Arrow key on the keyboard to increase the value. Press the Down Arrow key to decrease the value.
How much the field value is changed depends on the field. You can modify the step size using the Control and Alt keys:
Press the Esc key to reset the field to the initial value.
Below the two displays is an associated control panel, called the Display Panel, where you can select one of three Display Types.
Tip: you can hide the right sidebar to enlarge the displays by clicking on the arrow button at the right edge of the page title. You may also want to maximaze the browser window. If you want to make comparisons that are not natively supported by the App, open a second separate browser window.
Each of the two displays may show a different image or graph:
Tip: Set Display = Baro if you change the Barometric Settings on the Baro panels to show how this affects the calculated curves.
You can select whether the display shows the Flat Earth or Globe Model simulation. To both models Refraction can be applied independently.
Tip: Check the Camera Options EyeLvl and Horizon on the panel Rendering to display the eye level and/or the line of the geometric horizon of the globe earth.
Specifies which Refraction type to apply on the Display Type Image and Rays.
If the Display Type Baro is selected, you can select which 2 of 3 calculated barometric curves are displayed.
The Camera and the Ray Tracer are part of the Rendering Panel. The Camera defines the visual aspects of the rendered images.
The Observer Height specifies the altitude of the camera measured from the surface of the earth. It also defines the position of the Eye Level Line, which can be displayed in the rendered images by selecting the corresponding Camera Options.
The Camera Zoom specifies the viewing angle, like on a real camera. The greater the number, the smaller the angle, the more the magnification. The value is calibrated to a 35 mm sensor diagonal size.
Tip: When creating new Targets it is often necessary to change the Zoom temporarily to see the whole Target until its parameters are set.
Tip: Use the Arrow Keys to change the Value.
The Camera Tilt can be used to vertically adjust the image. Positive values tilt the camera up and the image moves down.
Tip: Use the Arrow Keys to change the Value.
You can select the final Pixel Size of the rendered images to stop the rendering process at an earlier state. This may be usefull while building a new scene and you quickly want a rough preview of the scene.
Of no Oversampling is selected, then for each image pixel exactly one point of the scene is sampled using a single light ray. If you select one of the other Oversampling settings, for each image pixel multiple neighboring scene points are sampled and the mean color value is displayed as the pixel color.
Oversampling is useful if some pattern or loaded images have a higher resolution than the display. It may reduce some artefacts and smoothes edges (antialiasing).
Oversampling slows down the rendering process according to the selected rate. 2x2 takes 4 times the rendering time than with no Oversampling.
Note: On the Display Model Flat Earth the eye level line is identical with the horizon line: "The horizon always raises to eye level" (flat earther claim erroneously, this is what we can observe).
The Ray Tracer is the heart of the simulator. It calculates all light rays from the observer to all the targets in a scene according to the Barometric Settings the user provides. From the intersections of the light rays with the targets the color of each image pixel is calculated.
See How the Simulation works for more details.
If a light ray does not hit any Target, a horizon color is displayed. The horizon color is a color gradient specified by Horizon Color, Zenith Color and Gradient Height.
You can set the Gradient Height to auto by entering anything but a number. If the field is set to auto then the value is calculated such that the top of the image is the limit.
See Color for how a color value is entered.
Each light ray is divided into a number of Ray Segments, depending on Ray Delta or Num Segments. Each light ray is followed until is hits an opaque target or exceeds the value Horizon Dist.
Tip: To speed up the rendering process set Horizon Dist as small as possible. If a Target lies beyond this distance, it is not displayed, so this value has to be greater than the Target distances.
Tip: Set the value to auto by entering anything except a number into the field. If the field displays auto, then the distance of the farthest upright Target plus some margin is used as the horizon distance.
Each light ray is divided into a number of Ray Segments. Ray Delta specifies the length of each segement. The smaller the value, the slower the rendering process, but the more accurate the simulation.
Because the simulation makes use of curved ray segments, the accuracy of the simulation is not much dependent on the segment length. A value of 1/25 the Horizon Dist is suitable.
If you have many Targets in different distances you have to set a shorter segment length, so that at least 2 to 3 segments are computed between the observer and the first target.
Tip: Set the value to auto by entering anything except a number into the field. If the field is set to auto it displays "Num Segments >>" and the segment length is calculated by (Horizon Dist / Num Segments).
Each light ray is divided into a number of Ray Segments. With Num Segments you can specify how much segments have to be used for each light ray until it reaches Horizon Dist.
If this field is disabled and shows "<< Ray Delta", then the segment length is specified by the field Ray Delta instead. You can enable this field by entering anything but a number into the field Ray Delta. See also description there.
Each light ray is divided into a number of Ray Segments specified by Ray Delta or Num Segments.
Max Segments limits the number of ray segments to prevent infinite loops in the calculations.
If Max Segments for a light ray is exceeded before hitting a Target or the Horizon, the correponding pixel is displayed in dark red.
Tip: If you want to stop the rendering process before it is finished, simply select another Display Type than Image.
Simulates haze or fog. A value of 0 means no visibility limit, so you can see until Ray Tracer Horizon Dist. All other values give the distance, where only 50% visibility happens. In double the distance you have 50% of 50% visibility, that is 25%.
There are two panels for Barometric Settings: Baro Observer and Baro Target. The panels are identical but the values are applied to two different distances from the observer.
The values of the Baro Target panel are optional. If no values are providet, the values of the Baro Observer panel are used for the whole scene.
Altough the barometric pressure has not as much influence on Refraction as the Temperature Gradient, it can be specified anyway. You can only spcify one single pressure. The specified pressure is gradually blended into the pressure of the Standard Atmosphere below 11 km. Above this the pressure gradient of the Standard Atmosphere is always applied.
In the field Pressure Alt you can specify at which altitude the pressure in the field Pressure is measured. The altitude is limited to 9 km and the pressure is limited to a realistic range, depending on the altitude provided.
The Measure Dist is the distance from the observer, where the barometric data has to be applied. If you specify a second set of barometric data in the Baro Target panel, don't forget to set the distance accordingly.
The distance in the Baro Observer panel is limited to 0 and 1 km less than the value specified in the Baro Target panel.
If you only specify data on the observer panel, this data is applied to the whole scene. If you additionally specify data on the target panel, the values between the two distances are interpolated according to the position of a Ray Segment. Beyond this distances the data of the nearer settings is applied.
The specified Baro Altitude and Temperature pairs define the Temperture Curve. The simulation connects tge data point with a so called spline curve. With Smoothness can be specified how smooth the curve is at the data points. A value of 0 results in straight lines between the data points. A value of 1 makes the curve as smooth as possible but may result in "overshoothing" of the curve. Default value is 0.75.
You can specify 5 pairs of Altitude/Temperature points. The simulator connects these points with a smooth Spline Curve. This curve specifies the Temperature Curve which is the basis for the Refraction calculation.
The entries in the field are automatically sorted by altitude. If you want to insert a new point between two existing ones, simply enter it in a field that is labeled as undefined. To delete a point, enter any value except a number into the Altitude field.
Tip: Select the Display Type Baro below one of the displays to see the calculated curves. The provided data points are marked on the Temperature Curve.
Tip: Use the Arrow Keys to change the Values.
The Graphs panel can be used to specify some display options if one of the Display Types Rays or Baro ist selected. If none of these display types is selected, the controls of the panel are disabled.
The Alt Range specifies the top limit of the altitude that is displayed on the Rays and Baro Display Types.
If auto is displayed in the input field, the range is selected automatically according to the highest temperature point provided in the Baro Settings. To set the field to auto enter anything except a number.
Note: The Alt Range value is only applied in the Display Type Rays if Aspect Ratio streched is selected.
The Dist Range specifies the distance range of the Rays Display.
If the input field displays auto, the distance of the farthest upright Target is used or if no such Target exists a default value is selected. To set the field to auto enter anything except a number.
The Ray Angle specifies the spreading angle of the light rays on the Rays Display.
Note: if the Aspect Ratio is not set to 1:1, the scale of the vertical axes is magnified a lot. To get a displayed angle of say 45° you have to enter a much smaller value, often much less than 1°.
The Num of Rays specifies the number of light rays shown on the Rays Display.
Tip: Use the Arrow Keys to change the Value.
Because the distance of the Targets in almost all cases is much greater than the Observer Height, the Rays Display is scaled very differently in the two axes to make the bending of the light rays visible.
With Aspect Ratio you can change the vertical scaling:
On the Rays Display you can select whether the light ray source is the observer or whether the rays are sent out parallel along the vertical axes.
On the Rays Display you can select whether the horizon line and the eye level line are displayed or not. They correspond to the Camera Options with the same label.
The horizon line is the tangent from the observers eye to the surface of the earth. This corresponds to the geometrical horizon displayed in the rendered images.
Note: The location of the geometrical horizon is indicated by a vertical arrow. You can read off the distance to the geometrical horizon on the horizontal scale below.
A Scene is composed of a list of Targets. A Target can be an Image or a Pattern.
Each Target can be positioned and rotated individually.
A Target can be sized as needed. This is important if you use images that show a certain scene like a skyline.
A Target can have Boundaries/Limits or it can be infinetely extended in any direction. If a Target is an image without boundary limits, the image is repeated.
Targets can be made partially transparent. Simulated Light Rays are sent through the scene until they hit an opaque Target or exceed the Horizon limit.
To create a new Target, open the Targets panel and click on New. A copy of an internal Target Template is created. You can also create a Copy of the current selected Target by clicking Clone and then change some parameters. Or you can create one of the Preset Targets.
Note: Targets are treated differently in the Model Flat Earth and Globe Earth. On the Flat Earth model the targets are always flat planes. On the Globe Model the same targets are wraped around the globe, so targets that are not entirely vertical are curved. This allows to create targets like water images that are flat on the Flat Earth display but curved on the Globe Earth display.
Note: For some scenes the order of the Targets may be important. You can move the Targets in the sequence with the buttons Move Up and Move Down.
Target Name is only for display and has no function.
Tip: Give each Target a descriptive name to quickly identify it when switching between Targets with Prev and Next buttons above.
Each Target has a zero point whose position in the scene can be specified by these parameters.
Coordinate System: Dist X points into the display, Up Y points up and Right Z points to the right.
You can rotate a Target around the three axes X, Y, Z. If a Target is not rotated it is facing the camera. The Target gets rotated around its Zero Point.
Coordinate System: X axes points into the display, Y axes points up, Z axes points to the right.
To create a Target that lies at the ground, eg. water, you have to rotate the Target around the Z axes −90°.
You have to specify a Width and Height for each Target. Width and Height are in World Coordinates. How big a Target will appear on the display depends on its position and the Camera Focal Length too.
If you set one of the fields to auto, the other value is calculated such that the aspect ratio of the image is maintained. If you set both fields to auto, the native image size or a default size is selected. You set a field to auto by entering anything except a number.
Each Target like an Image or a Pattern can have boundaries or not. You can specify boundaries on each side of a Target separately.
The Limits of the Target don't have to match with the edges of an Image. Specifying Limits less than the Target Width and Height of an image, you can crop the image. If the Limits exceed the edges of the image, the image gets repeated. You can specify no Limits, in which case the image is repeated in all directions infinitely. This is usefull eg. for water.
When a Target is a Pattern, you probably want the pattern to be repeated a certain times on each side. The Target Width and Height defines the size of the base Pattern without repetition. By extending the Limits/Boundaries you can repeat the base Pattern arbitrarily.
Note: Some Patterns like the Light Pattern are not repeatable. Set the Target Limit Type of such Patterns to Width/Height so that the App does not have to check collisions of the light ray with that Target outside its visible range.
With Limit Type you can specify which type of limit is applied.
Note: With the Custom option you can specify a limit for each side respectively. If one side should be limitless, enter anything except a number.
You can temporarily hide a Target with this option. This way you don't have to delete targets you don't want to see in the rendered image.
Tip: define two water pattern, one opaque and one transparent and quickly swich between them by hiding one of them. You can quickly create the second water pattern with the Clone button.
You can load an image from the web into a Target by entering the URL to the image in this field. You have then to specify how big in world coordinates the image should appear by entering the dimensions in the fields Target Width and Height. By default a Target is vertical, but can be rotated with Target Orientation. The boundaries of the image can be defined by Target Limits.
The loading state of the image is displayed on the right of the input field:
I can host an image for you if you get in contact with me.
Select a Pattern to fill the Target with. Depending on the selected Pattern you have to specify some Parameters. Each Pattern can have a different number of Parameters. The Parameter fields that are not used by a Pattern are disabled.
If a Target Image URL is specified, this option is disabled, because the image has priority. If you want to create a Pattern-Target, the Target Image URL field must be empty.
With the Alpha value you can make any Target globaly transparent. A value of 1 means the Traget is opaque. A value of 0 means the Traget is fully transparent and invisible.
Note: you can additionally specify an Alpha value for each Color with the Alpha Channel. The Color Alpha Channel and the Alpha value are combined (multiplied).
You can specify a single Color in an Image or Pattern as transparent with the Transp Color field.
You can specify an individual color of the Target to be transparent with the Tranp Color field. This way you can for example overlay multiple rotated Patterns by making some color of each Pattern transparent.
If you do not want to use the Transparent Color, enter anything except numbers.
If you have an image specified in the field Target Image URL, you can make a certain color of the image transparent. So for example you can draw an image and use a specific color as the transparent color.
You can specify the Transparency of the whole Target with the Alpha field.
Each Target Pattern has its own set of Parameters to specify its appearance on the display. Not used Parameters are disabled.
Colors are composed of 3 or 4 values in the range from 0 to 1. The first 3 values give the amount of the base colors red, green and blue (rgb) in this order. This base colors are mixed together accordingly to define the color.
The optional 4th value is the Alpha channel. It specifies the transparency of the color. If you omit this value or set it to 1, the color is opaque. A value of 0 is fully transparent = invisible.
To specify a color you have to enter 1 to 4 values in a Color field. There are 3 ways to enter a color:
A Scene is composed of a list of Targets. A Target can be an Image or a Pattern.
Each Target can be positioned and rotated individually.
A Target can be sized as needed. This is important if you use images that show a certain scene like a skyline.
A Target can have Boundaries/Limits or it can be infinetely extended in any direction. If a Target is an image without boundary limits, the image is repeated.
Targets can be made partially transparent. Simulated Light Rays are sent through the scene until they hit an opaque Target or exceed the Horizon limit.
To create a new Target, open the Targets panel and click on New. A copy of an internal Target Template is created. You can also create a Copy of the current selected Target by clicking Clone and then change some parameters. Or you can create one of the Preset Targets.
Note: Targets are treated differently in the Model Flat Earth and Globe Earth. On the Flat Earth model the targets are always flat planes. On the Globe Model the same targets are wraped around the globe, so targets that are not entirely vertical are curved. This allows to create targets like water images that are flat on the Flat Earth display but curved on the Globe Earth display.
Note: For some scenes the order of the Targets may be important. You can move the Targets in the sequence with the buttons Move Up and Move Down.
Because each simulated Light Ray is dividet into many Ray Segments, a limit must be defined so that the calculation is stopped if no opaque Target is hit. This limit is called the Horizon.
A color gradient can be specified for the Horizon, so that a light ray hitting the horizon has a defined color assigned to it. The specified Horizon Distance limits how far a light ray has to be calculated.
In the simulation each light ray is dividet into many Ray Segments. For each Ray Segment the Ray Curvature is calculated separately from the Refraction Coefficient at the position of the Ray Segment, see How Custom Refraction is derived.
The Ray Curvature is the bending of a simulated Ray Segment. The Ray Curvature is derived from the Refraction Coefficient and the vertical angle of the Ray Segment at its position.
The Refraction Coefficient is a measure of the Ray Curvature of a light ray with respect to the radius of the earth. The Refraction Coefficient is defined as:
(1) |
| |||||||||
where' |
|
A value of k = 0 means the Ray Segment is straight. A value of k = 1 means the Ray Segment has the same curvature radius as the earth. Ray segments with negative Coefficients are bent upwards.
The Refraction Coefficient can be calculated from atmospheric properties such as Pressure, Temperature and Temperature Gradient at any position of a light ray segment. It also depends on the vertical angle of the ray segment, see equation (1).
The Refraction Coefficient in reality is slightly different at each location of a light ray from the observer to the Target. In practical applications like survey a mean Refraction Coefficient may be used as an approximation. The simulation calculates the individual Refraction Coefficient for each Ray Segment along the whole way from the observer to a target.
The Refraction Curve describes the Refraction Coefficient as a function of altitude, so each altitude is a certain Refraction Coefficient assigned. The Refraction Curve is derived from the Barometric Settings, see How Custom Refraction is derived.
The simulation calculates two Refraction Curves, one for the observer location and one for a Target location the user can specify. For all locations between observer and target the Refraction Coefficient is derived by interpolating the Refraction Coefficient from this two curves according to the altitude and location of a Ray Segment. If no Barometric Settings are defined for a target location, the observer Refraction Curve is used everywhere.
The Pressure changes with altitude. Such a change is described by a Pressure Curve, which gives the Pressure as a function of altitude.
The simulation uses the Standard Atmosphere as the basis for the Pressure Curve but modifies it according to the user specified Pressure entered in the Barometric Settings.
The temperature changes with altitude. Such a change is described by a Temperature Curve, which gives the Temperature as a function of altitude.
The simulation uses some discrete user specified temperature values to calculate a smooth Temperature Curve through these points. The calculated curve blends into the curve as defined by the Standard Atmosphere above the highest specified Temperature point.
The Temperature Gradient describes the change in Temperature at each altitude. Mathematically it is the Derivative of the Temperature Curve with respect to altitude.
The simulation calculates a Temperature Gradient Curve from the Temperature Curve.
The Temperature Gradient Curve is a mathematically curve that connects all Temperature Gradient values for a specific altitude and is derived from the Temperature Curve. The Temperature Gradient Curve is used in the calculation of the Refraction Curve.
The Standard Atmosphere defines curves for Temperature, Pressure, air Density and Temperature Gradient for each altitude up to about 85 km. These curves are derived from mean values and used as a reference in many applications, eg. in aviation.
The simulation contains the Standard Atmosphere model and uses it for regions the user does not provide atmospheric data data.