set_trail Subroutine

private subroutine set_trail(self, past, future, fade)

A trail (see the module documentation): only the part within past before the current time and future after it (s, >= 0; 0: none of it; huge(1.0_wp): no limit), each fading out over the last fade (0 to 1, default 0.25) of its window toward its cutoff. Replaces trace mode while set.

Type Bound

CurveArtist

Arguments

Type IntentOptional Attributes Name
class(CurveArtist), intent(inout) :: self
real(kind=wp), intent(in) :: past

s before and after the current time

real(kind=wp), intent(in) :: future

s before and after the current time

real(kind=wp), intent(in), optional :: fade

of each part's window (default 0.25)


Source Code

    subroutine set_trail(self, past, future, fade)
        class(CurveArtist), intent(inout) :: self
        real(wp), intent(in) :: past, future                !! s before and after the current time
        real(wp), intent(in), optional :: fade              !! of each part's window (default 0.25)
        self%trail_%on = .true.
        self%trail_%past = max(0.0_wp, past)
        self%trail_%future = max(0.0_wp, future)
        if (present(fade)) self%trail_%fade = max(0.0_wp, min(1.0_wp, fade))
        self%tail_time = huge(1.0_wp)                       ! (drawn again at the next update)
    end subroutine set_trail