Scene.phase_angle¶
- Scene.phase_angle(target_index)[source]¶
This method computes the phase angle between the observer, the target at
target_index
and thelight_obj
.The phase angle is define as the interior angle between the vector from the target to the light and the vector from the target to the observer. The phase angle is computed as the arccos of the dot product of the unit vectors in these two directions, and is returned with units of radians.
This method assumes that the scene has already been put in the observer frame, that is, the observer is located at the origin and the
light_obj
and the target are also defined with respect to that origin.The phase angle will always be between 0 and \(\pi\) radians (0-180 degrees)
- Parameters:
target_index (int) – the index into the
target_objs
list for which to compute the phase angle for- Returns:
the phase angle in radians
- Return type:
float