The trajectory's color at time t (between points i and i + 1: blended),
own for points without one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(MarkerArtist), | intent(in) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
the time; the color for points without one |
||
| real(kind=wp), | intent(in) | :: | own(4) |
the time; the color for points without one |
function color_at(self, t, own) result(rgba) type(MarkerArtist), intent(in) :: self real(wp), intent(in) :: t, own(4) !! the time; the color for points without one real(wp) :: rgba(4), c1(4), t0, t1 integer :: status, i, n n = self%traj%num_times() status = self%traj%time_index(t, i) i = max(1, min(n, i)) rgba = point_rgba_or(self%traj, i, own) if (i >= n) return t0 = self%traj%time(i) t1 = self%traj%time(i + 1) if (t1 == t0) return c1 = point_rgba_or(self%traj, i + 1, own) rgba = rgba + max(0.0_wp, min(1.0_wp, (t - t0) / (t1 - t0))) * (c1 - rgba) end function color_at