The bound of the apex and the base.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(PolyhedralCone), | intent(in) | :: | self | |||
| real(kind=wp), | intent(out) | :: | center(3) |
the bounding sphere, frame coordinates (scene units) |
||
| real(kind=wp), | intent(out) | :: | radius |
the bounding sphere, frame coordinates (scene units) |
subroutine cone_bound(self, center, radius) class(PolyhedralCone), intent(in) :: self real(wp), intent(out) :: center(3), radius !! the bounding sphere, frame coordinates (scene units) real(wp) :: r r = self%length_ * maxval(tan(self%cone)) center = [0.0_wp, 0.0_wp, -0.5_wp * self%length_] radius = sqrt((0.5_wp * self%length_)**2 + r**2) end subroutine cone_bound