shadow
shadow
#
How far apart the shadows of two sun positions fall.
An upright pin one unit tall casts a shadow whose tip moves quickly when the sun is low and slowly near noon. Measuring sun positions by where that tip falls therefore spends more captures on the long, fast-changing shadows of morning and evening.
- Land. Find where the shadow's tip falls. On level ground, the tip is on the ground. In a square courtyard with walls of unlimited height, the tip stays on the ground until the shadow reaches a wall, then climbs that wall. The wall is unfolded flat, so a height on the wall continues the ground outward. On a wall, the tip reaches the pin's height at sunset and keeps climbing through twilight and night, so every sun position has a landing point.
- Compare. Measure the straight-line distance between two landing points. In a courtyard, the landing point moves at a bounded rate from sunrise through sunset and after.
ShadowDistanceFunction
#
Bases: DistanceFunction[SolarPosition]
Distance between two pin-shadow tips, in pin heights, divided by sigma_heights.
Source code in capturegraph-recipes/capturegraph_recipes/scheduling/distance/shadow.py
__init__(sigma_heights=0.1, courtyard_heights=None)
#
Normalize by sigma_heights; courtyard_heights as in shadow.
Source code in capturegraph-recipes/capturegraph_recipes/scheduling/distance/shadow.py
coverage(points, captures, weights=None)
#
As DistanceFunction.coverage; unweighted, by each point's nearest tip alone.
Source code in capturegraph-recipes/capturegraph_recipes/scheduling/distance/shadow.py
extract(values)
#
Where each position's shadow tip lands, as (east, north) in pin heights.
A row is nan for a missing position and, on level ground, for a sun below the horizon.
Source code in capturegraph-recipes/capturegraph_recipes/scheduling/distance/shadow.py
pairwise(features_a, features_b)
#
The distances between two sets of landing points.
Source code in capturegraph-recipes/capturegraph_recipes/scheduling/distance/shadow.py
in_courtyard(altitude, azimuth, half_width)
#
Where the shadow of the pin's top lands in a courtyard for each sun, with the walls unfolded.
The shadow lands on the ground if it reaches the ground before the first wall
in its path. Otherwise it meets that wall at height
1 - distance · tan(altitude), where distance runs from the pin to the
wall along the shadow. This height exceeds the pin's once the sun is down,
and it is added to the landing point along the wall's axis, away from the pin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
altitude
|
ndarray
|
Each sun's altitude, in degrees. |
required |
azimuth
|
ndarray
|
Each sun's azimuth, in degrees. |
required |
half_width
|
float
|
How far each wall stands from the pin, in pin heights. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
|
Source code in capturegraph-recipes/capturegraph_recipes/scheduling/distance/shadow.py
shadow(sigma_heights=0.1, courtyard_heights=None)
#
Create a distance function over where an upright pin's shadow ends.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sigma_heights
|
float
|
Normalization in pin heights: sun positions whose shadows
end within |
0.1
|
courtyard_heights
|
float | None
|
The width of a square courtyard centred on the pin,
in pin heights. A shadow that reaches a wall climbs it instead of
continuing along the ground, so the distance stays defined through
sunset and into the night. |
None
|
Returns:
| Type | Description |
|---|---|
ShadowDistanceFunction
|
A distance function |
ShadowDistanceFunction
|
ground, it is |