[x3d-public] Sequencer interval definition
vmarchetti at kshell.com
vmarchetti at kshell.com
Sat Sep 30 16:49:45 PDT 2017
> On Sep 4, 2017, at 11:45 AM, Andreas Plesch <andreasplesch at gmail.com> wrote:
>
> Resending this without html formatting to ensure proper transmission:
>
> 30.2.4 defines how sequencer values are assigned to key intervals:
>
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/utils.html#SequencingEvents
>
> (−infinity, t0), [t0, t1), [t1, t2), ... , [tn-1, +infinity)
>
> are the intervals.
>
> The square bracket [ seems to indicate that the limiting value does not belong to the interval. Is that the case ?
I'm more used to the square bracket indicating a closed boundary, so that the for the interval denoted [a,b) ; x is in the interval a <= x < b
so a is an element of the interval but b is not. Take the view that neither +infinity nor -infinity is a number; so (-infinity,a) is just shorthand for the set x < a, while [a,+infinity) is x >= a.
>
> For example, in the second interval [t0, t1) t0 does not belong to the interval but t1 does.
> I have seen other notations where this interval would be described as ]t0, t1] which I would offer as a suggestion for an improvement.
>
> The next question is about the piecewise function definition:
>
> f(t) = v_n, if t_n <= t < t_(n-1)
>
> Given that the keys t_i are given in a monotonically non-decreasing order, t_n is always larger (or equal to) than t_(n-1). Therefore, a t larger than t_n can never be smaller than t_(n-1). But this is the condition described in the function for value v_n. There is no possible t which can fulfill this condition.
> Presumably this condition was designed as:
>
> f(t) = v_n, if t_n >= t > t_(n-1)
>
> If this is the case I can submit a spec. comment but I very much would appreciate additional eyes on that since it seems like a rather fundamental oversight. Did I overlook something ?
>
My set of eyes agrees with yours that the formula form in the v 3.3 version of section 30.2.4 is incorrect, I would propose a corrected version:
f(t) = v_i, if t_{i-1} ≤ t < t_{i} for 1 <= i < n-1
= v_0, if t < t_0,
= v_{n−1}, if t ≥ t_{n−1}
> The Interpolator component spec. may provide additional insight:
>
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/interp.html#Linearinterpolation
>
> Here the equivalent piecewise function definition is:
>
> f(t) = linterp(t, v_i, v_(i+1)), if t_i <= t <= t_(i+1),
>
> Note that the interval condition here is between t_i and t_(i+1) and not t_(i-1). So this is correct. But why change for Sequencer to t_(n-1) ? Perhaps there is a reason ?
>
> Also note that i is used rather than n which is also more correct since n is reserved for the fixed, total number of keys, whereas i is the variable index depending on the whatever time t is considered.
>
> -Andreas
>
> --
> Andreas Plesch
> Waltham, MA 02453
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
More information about the x3d-public
mailing list