Inside the elliptic cone (exactly; OpenFrames' EllipticCone::isVisible).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(EllipticCone), | intent(in) | :: | self | |||
| real(kind=wp), | intent(in) | :: | point(3) |
in the cone's frame (scene units) |
||
| real(kind=wp), | intent(in), | optional | :: | min_distance |
along the boresight (scene units) |
|
| real(kind=wp), | intent(in), | optional | :: | max_distance |
along the boresight (scene units) |
logical function elliptic_is_visible(self, point, min_distance, max_distance) result(visible) class(EllipticCone), intent(in) :: self real(wp), intent(in) :: point(3) !! in the cone's frame (scene units) real(wp), intent(in), optional :: min_distance, max_distance !! along the boresight (scene units) real(wp) :: p(3), cone, clock visible = in_range(point, min_distance, max_distance) if (.not. visible .or. norm2(point) == 0.0_wp) return p = point / (-point(3)) cone = atan(norm2(p(1:2))) clock = atan2(p(2), p(1)) visible = cone <= self%a * self%b / sqrt(self%b**2 * cos(clock)**2 + self%a**2 * sin(clock)**2) end function elliptic_is_visible