The bounds of the points (for the attenuation radius: OpenFrames uses the artist's bounding sphere).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(MarkerArtist), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | n |
the points |
||
| logical, | intent(in) | :: | zero |
all sources zero, or no trajectory: a marker at the origin |
subroutine update_bounds(self, n, zero) type(MarkerArtist), intent(inout) :: self integer, intent(in) :: n !! the points logical, intent(in) :: zero !! all sources zero, or no trajectory: a marker at the origin real(wp), allocatable :: v(:,:) real(wp) :: r if (zero) then self%lo = 0.0_wp self%hi = 0.0_wp else if (n > self%n_seen) then ! the new points, a range at a time allocate(v(3, n - self%n_seen)) call art_points(self, self%n_seen + 1, n, self%sources_, v) if (self%n_seen == 0) then self%lo = v(:, 1) self%hi = v(:, 1) end if self%lo = min(self%lo, minval(v, dim=2)) self%hi = max(self%hi, maxval(v, dim=2)) end if self%n_seen = n r = 0.5_wp * norm2(self%hi - self%lo) if (r < 1.0e-8_wp) r = 0.0_wp ! too small: no attenuation (as OpenFrames) if (r /= self%radius) then self%radius = r if (self%attenuate) call marker_style(self) end if end subroutine update_bounds