Skip to main content
Typo
Source Link
StefLAncien
  • 6.7k
  • 5
  • 20

(Incomplete answer, mathematical retro-engineering to clarify the need)

Initial edition:
Stripped of extra parenthesis, the recast expression looks like:
$\frac{1}{2} \left\{ \left[ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} + \textrm{Offset} \right)} +1 \right]\times \textrm{Walking} + \left(1-\textrm{Walking}\right) \right\}$

Assuming $\textrm{Offset}=0$ and $\textrm{Walking}=1$, it is reduced to:
$\frac{1}{2} \left\{ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} \right)} +1 \right\}$

As is written in the question, $\frac{1}{2} \left\{ \cos{(x)} + 1 \right\}$ is cycling between 0 and 1. Furthermore, it appears that $\textrm{Speed}$ is homogenous to radian per frame. Assuming $\textrm{Speed}=0.901$ yields a period of about 14 frames (13.95 exactly, if frame count were not integer), because $\frac{1}{2} \times 14 \times 0.901 \simeq 2\pi$.

Changing/animating the $\textrm{Speed}$ will yield a discontinuity if the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ at constant $\textrm{Speed}$ is very different from the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ with the $\textrm{Speed}$ incrementation.

First edition:
Introducing $\omega = \frac{1}{2} \textrm{Speed}$ and $t = \textrm{frame}$, function $f_t(t, \omega)$ is defined as:
$f_t(t, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega t \right)} +1 \right\}$

Its differential is:
$df_t(t, \omega) = -\frac{1}{2} \sin{\left( \omega t \right)} \times d(\omega t)$

So its relative variation is:
$\frac{df_t}{f_t} = -\frac{\sin{\left( \omega t \right)}}{\cos{\left( \omega t \right)} +1 } \times d(\omega t)$

If $\textbf{Speed}$ is constant, $\omega$ also and $d(\omega t) = \omega dt$ is constant.
This is illustrated in the next figure, where the switch between $\omega_0$ yielding 25 frames per period and $\omega_1$ yielding 50 frames per period (green curve) is triggered at frame $t_0 = t_1 = 56$. Blue filled circles are for $f_t$ while blue empty circles are for $d(\omega t)$. Heaviside It is to notice the discontinuity of $f_t$ at $t=t_0$, induced by the jump of $\omega$ from $\omega_0$ to $\omega_1$. This flaw can by corrected by adjusting the phase.
To do so, introducing $\theta = t - t_0$ and $\varphi = \omega_0 t_0$, function $f_\theta(\theta, \omega)$ is defined as:
$f_\theta(\theta, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega \theta + \varphi \right)} +1 \right\}$

Rewriting $f_\theta$ as a function of $t$ instead of $\theta$ leads to:
$f_\theta(t, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega t + \left[ \omega_0 - \omega \right] t_0 \right)} +1 \right\}$

For $t < t_0$, $\omega = \omega_0$ and $f_\theta$ is identical to $f_t$.
For $t > t_0$, $\omega = \omega_1$ and the difference between $f_\theta$ and $f_t$ is the constant phase shift $\left[ \omega_0 - \omega_1 \right] t_0$.

This correction is illustrated in the previous figure with red symbols. Cross signs are for $f_\theta$ while plus sign are for $d(\omega \theta)$. Compared to blue filled circles, red crosses show a continuous variation.
It is to notice that $d\theta = dt$, so $d(\omega \theta) = d(\omega t)$ when $\omega$ is constant.

As a conclusion, in the original expression, the parameter $\textrm{Offset}$ can by triggered at the same time as $\textrm{Speed}$ if a Heaviside function is used to control $\textrm{Speed}$:

  • if $t < t_0$ : $\textrm{Speed} = 2 \omega_0$, $\textrm{Offset} = 0$.
  • if $t > t_0$ : $\textrm{Speed} = 2 \omega_1$, $\textrm{Offset} = \left[ \omega_0 - \omega_1 \right] t_0$.

If $\textbf{Speed}$ is a function of $\mathbf{t}$, $\omega$ also and $d(\omega t) = \omega dt + t d\omega$ is not constant.
Assuming $\omega$ is a linear function of $t \in [t_0, t_1]$ yields:
$\omega(t) = \omega_0 + \alpha (t-t_0)$ with $\alpha = \frac{\omega_1 - \omega_0}{t_1-t_0}$.
So:
$d(\omega t) = \left\{ (\omega_0 - \alpha t_0) + 2 \alpha t \right\} dt$
is a linear function of $t$ also.

This is illustrated in the next figure, where $\omega$ varies linearly from $\omega_0$ at $t_0=56$ to $\omega_1$ at $t_1=206$. It shows that $d(\omega t)$ is not continuous and that it might exceed $\omega_0 dt$ or $\omega_1 dt$. Linear t0=56

(to be continued)

(Incomplete answer, mathematical retro-engineering to clarify the need)

Initial edition:
Stripped of extra parenthesis, the recast expression looks like:
$\frac{1}{2} \left\{ \left[ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} + \textrm{Offset} \right)} +1 \right]\times \textrm{Walking} + \left(1-\textrm{Walking}\right) \right\}$

Assuming $\textrm{Offset}=0$ and $\textrm{Walking}=1$, it is reduced to:
$\frac{1}{2} \left\{ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} \right)} +1 \right\}$

As is written in the question, $\frac{1}{2} \left\{ \cos{(x)} + 1 \right\}$ is cycling between 0 and 1. Furthermore, it appears that $\textrm{Speed}$ is homogenous to radian per frame. Assuming $\textrm{Speed}=0.901$ yields a period of about 14 frames (13.95 exactly, if frame count were not integer), because $\frac{1}{2} \times 14 \times 0.901 \simeq 2\pi$.

Changing/animating the $\textrm{Speed}$ will yield a discontinuity if the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ at constant $\textrm{Speed}$ is very different from the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ with the $\textrm{Speed}$ incrementation.

First edition:
Introducing $\omega = \frac{1}{2} \textrm{Speed}$ and $t = \textrm{frame}$, function $f_t(t, \omega)$ is defined as:
$f_t(t, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega t \right)} +1 \right\}$

Its differential is:
$df_t(t, \omega) = -\frac{1}{2} \sin{\left( \omega t \right)} \times d(\omega t)$

So its relative variation is:
$\frac{df_t}{f_t} = -\frac{\sin{\left( \omega t \right)}}{\cos{\left( \omega t \right)} +1 } \times d(\omega t)$

If $\textbf{Speed}$ is constant, $\omega$ also and $d(\omega t) = \omega dt$ is constant.
This is illustrated in the next figure, where the switch between $\omega_0$ yielding 25 frames per period and $\omega_1$ yielding 50 frames per period (green curve) is triggered at frame $t_0 = t_1 = 56$. Blue filled circles are for $f_t$ while blue empty circles are for $d(\omega t)$. Heaviside It is to notice the discontinuity of $f_t$ at $t=t_0$, induced by the jump of $\omega$ from $\omega_0$ to $\omega_1$. This flaw can by corrected by adjusting the phase.
To do so, introducing $\theta = t - t_0$ and $\varphi = \omega_0 t_0$, function $f_\theta(\theta, \omega)$ is defined as:
$f_\theta(\theta, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega \theta + \varphi \right)} +1 \right\}$

Rewriting $f_\theta$ as a function of $t$ instead of $\theta$ leads to:
$f_\theta(t, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega t + \left[ \omega_0 - \omega \right] t_0 \right)} +1 \right\}$

For $t < t_0$, $\omega = \omega_0$ and $f_\theta$ is identical to $f_t$.
For $t > t_0$, $\omega = \omega_1$ and the difference between $f_\theta$ and $f_t$ is the constant phase shift $\left[ \omega_0 - \omega_1 \right] t_0$.

This correction is illustrated in the previous figure with red symbols. Cross signs are for $f_\theta$ while plus sign are for $d(\omega \theta)$. Compared to blue filled circles, red crosses show a continuous variation.
It is to notice that $d\theta = dt$, so $d(\omega \theta) = d(\omega t)$ when $\omega$ is constant.

As a conclusion, in the original expression, the parameter $\textrm{Offset}$ can by triggered at the same time as $\textrm{Speed}$ if a Heaviside function is used to control $\textrm{Speed}$:

  • if $t < t_0$ : $\textrm{Speed} = 2 \omega_0$, $\textrm{Offset} = 0$.
  • if $t > t_0$ : $\textrm{Speed} = 2 \omega_1$, $\textrm{Offset} = \left[ \omega_0 - \omega_1 \right] t_0$.

If $\textbf{Speed}$ is a function of $\mathbf{t}$, $\omega$ also and $d(\omega t) = \omega dt + t d\omega$ is not constant.
Assuming $\omega$ is a linear function of $t \in [t_0, t_1]$ yields:
$\omega(t) = \omega_0 + \alpha (t-t_0)$ with $\alpha = \frac{\omega_1 - \omega_0}{t_1-t_0}$.
So:
$d(\omega t) = \left\{ (\omega_0 - \alpha t_0) + 2 \alpha t \right\} dt$
is a linear function of $t$ also.

This is illustrated in the next figure, where $\omega$ varies linearly from $\omega_0$ at $t_0=56$ to $\omega_1$ at $t_1=206$. It shows that $d(\omega t)$ is not continuous and that it might exceed $\omega_0 dt$ or $\omega_1 dt$. Linear t0=56

(to continued)

(Incomplete answer, mathematical retro-engineering to clarify the need)

Initial edition:
Stripped of extra parenthesis, the recast expression looks like:
$\frac{1}{2} \left\{ \left[ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} + \textrm{Offset} \right)} +1 \right]\times \textrm{Walking} + \left(1-\textrm{Walking}\right) \right\}$

Assuming $\textrm{Offset}=0$ and $\textrm{Walking}=1$, it is reduced to:
$\frac{1}{2} \left\{ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} \right)} +1 \right\}$

As is written in the question, $\frac{1}{2} \left\{ \cos{(x)} + 1 \right\}$ is cycling between 0 and 1. Furthermore, it appears that $\textrm{Speed}$ is homogenous to radian per frame. Assuming $\textrm{Speed}=0.901$ yields a period of about 14 frames (13.95 exactly, if frame count were not integer), because $\frac{1}{2} \times 14 \times 0.901 \simeq 2\pi$.

Changing/animating the $\textrm{Speed}$ will yield a discontinuity if the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ at constant $\textrm{Speed}$ is very different from the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ with the $\textrm{Speed}$ incrementation.

First edition:
Introducing $\omega = \frac{1}{2} \textrm{Speed}$ and $t = \textrm{frame}$, function $f_t(t, \omega)$ is defined as:
$f_t(t, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega t \right)} +1 \right\}$

Its differential is:
$df_t(t, \omega) = -\frac{1}{2} \sin{\left( \omega t \right)} \times d(\omega t)$

So its relative variation is:
$\frac{df_t}{f_t} = -\frac{\sin{\left( \omega t \right)}}{\cos{\left( \omega t \right)} +1 } \times d(\omega t)$

If $\textbf{Speed}$ is constant, $\omega$ also and $d(\omega t) = \omega dt$ is constant.
This is illustrated in the next figure, where the switch between $\omega_0$ yielding 25 frames per period and $\omega_1$ yielding 50 frames per period (green curve) is triggered at frame $t_0 = t_1 = 56$. Blue filled circles are for $f_t$ while blue empty circles are for $d(\omega t)$. Heaviside It is to notice the discontinuity of $f_t$ at $t=t_0$, induced by the jump of $\omega$ from $\omega_0$ to $\omega_1$. This flaw can by corrected by adjusting the phase.
To do so, introducing $\theta = t - t_0$ and $\varphi = \omega_0 t_0$, function $f_\theta(\theta, \omega)$ is defined as:
$f_\theta(\theta, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega \theta + \varphi \right)} +1 \right\}$

Rewriting $f_\theta$ as a function of $t$ instead of $\theta$ leads to:
$f_\theta(t, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega t + \left[ \omega_0 - \omega \right] t_0 \right)} +1 \right\}$

For $t < t_0$, $\omega = \omega_0$ and $f_\theta$ is identical to $f_t$.
For $t > t_0$, $\omega = \omega_1$ and the difference between $f_\theta$ and $f_t$ is the constant phase shift $\left[ \omega_0 - \omega_1 \right] t_0$.

This correction is illustrated in the previous figure with red symbols. Cross signs are for $f_\theta$ while plus sign are for $d(\omega \theta)$. Compared to blue filled circles, red crosses show a continuous variation.
It is to notice that $d\theta = dt$, so $d(\omega \theta) = d(\omega t)$ when $\omega$ is constant.

As a conclusion, in the original expression, the parameter $\textrm{Offset}$ can by triggered at the same time as $\textrm{Speed}$ if a Heaviside function is used to control $\textrm{Speed}$:

  • if $t < t_0$ : $\textrm{Speed} = 2 \omega_0$, $\textrm{Offset} = 0$.
  • if $t > t_0$ : $\textrm{Speed} = 2 \omega_1$, $\textrm{Offset} = \left[ \omega_0 - \omega_1 \right] t_0$.

If $\textbf{Speed}$ is a function of $\mathbf{t}$, $\omega$ also and $d(\omega t) = \omega dt + t d\omega$ is not constant.
Assuming $\omega$ is a linear function of $t \in [t_0, t_1]$ yields:
$\omega(t) = \omega_0 + \alpha (t-t_0)$ with $\alpha = \frac{\omega_1 - \omega_0}{t_1-t_0}$.
So:
$d(\omega t) = \left\{ (\omega_0 - \alpha t_0) + 2 \alpha t \right\} dt$
is a linear function of $t$ also.

This is illustrated in the next figure, where $\omega$ varies linearly from $\omega_0$ at $t_0=56$ to $\omega_1$ at $t_1=206$. It shows that $d(\omega t)$ is not continuous and that it might exceed $\omega_0 dt$ or $\omega_1 dt$. Linear t0=56

(to be continued)

Add Heaviside case.
Source Link
StefLAncien
  • 6.7k
  • 5
  • 20

(Incomplete answer, mathematical retro-engineering math to clarify the need)

StrippedInitial edition:
Stripped of extra parenthesis, the recast expression looks like:

  
$\frac{1}{2} \left\{ \left[ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} + \textrm{Offset} \right)} +1 \right]\times \textrm{Walking} + \left(1-\textrm{Walking}\right) \right\}$

Assuming $\textrm{Offset}=0$ and $\textrm{Walking}=1$, it is reduced to:

  
$\frac{1}{2} \left\{ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} \right)} +1 \right\}$

As is written in the question, $\frac{1}{2} \left\{ \cos{(x)} + 1 \right\}$ is cycling between 0 and 1. Furthermore, it appears that $\textrm{Speed}$ is homogenous to radian per frame. Assuming $\textrm{Speed}=0.901$ yields a period of about 14 frames (13.95 exactly, if frame count were not integer), because $\frac{1}{2} \times 14 \times 0.901 \simeq 2\pi$.

Changing/animating the $\textrm{Speed}$ will yield a discontinuity if the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ at constant $\textrm{Speed}$ is very different from the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ with the $\textrm{Speed}$ incrementation.

First edition:
Introducing $\omega = \frac{1}{2} \textrm{Speed}$ and $t = \textrm{frame}$, function $f_t(t, \omega)$ is defined as:
$f_t(t, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega t \right)} +1 \right\}$

Its differential is:
$df_t(t, \omega) = -\frac{1}{2} \sin{\left( \omega t \right)} \times d(\omega t)$

So its relative variation is:
$\frac{df_t}{f_t} = -\frac{\sin{\left( \omega t \right)}}{\cos{\left( \omega t \right)} +1 } \times d(\omega t)$

If $\textbf{Speed}$ is constant, $\omega$ also and $d(\omega t) = \omega dt$ is constant.
This is illustrated in the next figure, where the switch between $\omega_0$ yielding 25 frames per period and $\omega_1$ yielding 50 frames per period (green curve) is triggered at frame $t_0 = t_1 = 56$. Blue filled circles are for $f_t$ while blue empty circles are for $d(\omega t)$. Heaviside It is to notice the discontinuity of $f_t$ at $t=t_0$, induced by the jump of $\omega$ from $\omega_0$ to $\omega_1$. This flaw can by corrected by adjusting the phase.
To do so, introducing $\theta = t - t_0$ and $\varphi = \omega_0 t_0$, function $f_\theta(\theta, \omega)$ is defined as:
$f_\theta(\theta, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega \theta + \varphi \right)} +1 \right\}$

Rewriting $f_\theta$ as a function of $t$ instead of $\theta$ leads to:
$f_\theta(t, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega t + \left[ \omega_0 - \omega \right] t_0 \right)} +1 \right\}$

For $t < t_0$, $\omega = \omega_0$ and $f_\theta$ is identical to $f_t$.
For $t > t_0$, $\omega = \omega_1$ and the difference between $f_\theta$ and $f_t$ is the constant phase shift $\left[ \omega_0 - \omega_1 \right] t_0$.

This correction is illustrated in the previous figure with red symbols. Cross signs are for $f_\theta$ while plus sign are for $d(\omega \theta)$. Compared to blue filled circles, red crosses show a continuous variation.
It is to notice that $d\theta = dt$, so $d(\omega \theta) = d(\omega t)$ when $\omega$ is constant.

As a conclusion, in the original expression, the parameter $\textrm{Offset}$ can by triggered at the same time as $\textrm{Speed}$ if a Heaviside function is used to control $\textrm{Speed}$:

  • if $t < t_0$ : $\textrm{Speed} = 2 \omega_0$, $\textrm{Offset} = 0$.
  • if $t > t_0$ : $\textrm{Speed} = 2 \omega_1$, $\textrm{Offset} = \left[ \omega_0 - \omega_1 \right] t_0$.

If $\textbf{Speed}$ is a function of $\mathbf{t}$, $\omega$ also and $d(\omega t) = \omega dt + t d\omega$ is not constant.
Assuming $\omega$ is a linear function of $t \in [t_0, t_1]$ yields:
$\omega(t) = \omega_0 + \alpha (t-t_0)$ with $\alpha = \frac{\omega_1 - \omega_0}{t_1-t_0}$.
So:
$d(\omega t) = \left\{ (\omega_0 - \alpha t_0) + 2 \alpha t \right\} dt$
is a linear function of $t$ also.

This is illustrated in the next figure, where $\omega$ varies linearly from $\omega_0$ at $t_0=56$ to $\omega_1$ at $t_1=206$. It shows that $d(\omega t)$ is not continuous and that it might exceed $\omega_0 dt$ or $\omega_1 dt$. Linear t0=56

(to continued)

(Incomplete answer, retro-engineering math to clarify the need)

Stripped of extra parenthesis, the recast expression looks like:

 $\frac{1}{2} \left\{ \left[ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} + \textrm{Offset} \right)} +1 \right]\times \textrm{Walking} + \left(1-\textrm{Walking}\right) \right\}$

Assuming $\textrm{Offset}=0$ and $\textrm{Walking}=1$, it is reduced to:

 $\frac{1}{2} \left\{ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} \right)} +1 \right\}$

As is written in the question, $\frac{1}{2} \left\{ \cos{(x)} + 1 \right\}$ is cycling between 0 and 1. Furthermore, it appears that $\textrm{Speed}$ is homogenous to radian per frame. Assuming $\textrm{Speed}=0.901$ yields a period of about 14 frames (13.95 exactly, if frame count were not integer), because $\frac{1}{2} \times 14 \times 0.901 \simeq 2\pi$.

Changing/animating the $\textrm{Speed}$ will yield a discontinuity if the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ at constant $\textrm{Speed}$ is very different from the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ with the $\textrm{Speed}$ incrementation.

(Incomplete answer, mathematical retro-engineering to clarify the need)

Initial edition:
Stripped of extra parenthesis, the recast expression looks like: 
$\frac{1}{2} \left\{ \left[ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} + \textrm{Offset} \right)} +1 \right]\times \textrm{Walking} + \left(1-\textrm{Walking}\right) \right\}$

Assuming $\textrm{Offset}=0$ and $\textrm{Walking}=1$, it is reduced to: 
$\frac{1}{2} \left\{ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} \right)} +1 \right\}$

As is written in the question, $\frac{1}{2} \left\{ \cos{(x)} + 1 \right\}$ is cycling between 0 and 1. Furthermore, it appears that $\textrm{Speed}$ is homogenous to radian per frame. Assuming $\textrm{Speed}=0.901$ yields a period of about 14 frames (13.95 exactly, if frame count were not integer), because $\frac{1}{2} \times 14 \times 0.901 \simeq 2\pi$.

Changing/animating the $\textrm{Speed}$ will yield a discontinuity if the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ at constant $\textrm{Speed}$ is very different from the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ with the $\textrm{Speed}$ incrementation.

First edition:
Introducing $\omega = \frac{1}{2} \textrm{Speed}$ and $t = \textrm{frame}$, function $f_t(t, \omega)$ is defined as:
$f_t(t, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega t \right)} +1 \right\}$

Its differential is:
$df_t(t, \omega) = -\frac{1}{2} \sin{\left( \omega t \right)} \times d(\omega t)$

So its relative variation is:
$\frac{df_t}{f_t} = -\frac{\sin{\left( \omega t \right)}}{\cos{\left( \omega t \right)} +1 } \times d(\omega t)$

If $\textbf{Speed}$ is constant, $\omega$ also and $d(\omega t) = \omega dt$ is constant.
This is illustrated in the next figure, where the switch between $\omega_0$ yielding 25 frames per period and $\omega_1$ yielding 50 frames per period (green curve) is triggered at frame $t_0 = t_1 = 56$. Blue filled circles are for $f_t$ while blue empty circles are for $d(\omega t)$. Heaviside It is to notice the discontinuity of $f_t$ at $t=t_0$, induced by the jump of $\omega$ from $\omega_0$ to $\omega_1$. This flaw can by corrected by adjusting the phase.
To do so, introducing $\theta = t - t_0$ and $\varphi = \omega_0 t_0$, function $f_\theta(\theta, \omega)$ is defined as:
$f_\theta(\theta, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega \theta + \varphi \right)} +1 \right\}$

Rewriting $f_\theta$ as a function of $t$ instead of $\theta$ leads to:
$f_\theta(t, \omega) = \frac{1}{2} \left\{ \cos{\left( \omega t + \left[ \omega_0 - \omega \right] t_0 \right)} +1 \right\}$

For $t < t_0$, $\omega = \omega_0$ and $f_\theta$ is identical to $f_t$.
For $t > t_0$, $\omega = \omega_1$ and the difference between $f_\theta$ and $f_t$ is the constant phase shift $\left[ \omega_0 - \omega_1 \right] t_0$.

This correction is illustrated in the previous figure with red symbols. Cross signs are for $f_\theta$ while plus sign are for $d(\omega \theta)$. Compared to blue filled circles, red crosses show a continuous variation.
It is to notice that $d\theta = dt$, so $d(\omega \theta) = d(\omega t)$ when $\omega$ is constant.

As a conclusion, in the original expression, the parameter $\textrm{Offset}$ can by triggered at the same time as $\textrm{Speed}$ if a Heaviside function is used to control $\textrm{Speed}$:

  • if $t < t_0$ : $\textrm{Speed} = 2 \omega_0$, $\textrm{Offset} = 0$.
  • if $t > t_0$ : $\textrm{Speed} = 2 \omega_1$, $\textrm{Offset} = \left[ \omega_0 - \omega_1 \right] t_0$.

If $\textbf{Speed}$ is a function of $\mathbf{t}$, $\omega$ also and $d(\omega t) = \omega dt + t d\omega$ is not constant.
Assuming $\omega$ is a linear function of $t \in [t_0, t_1]$ yields:
$\omega(t) = \omega_0 + \alpha (t-t_0)$ with $\alpha = \frac{\omega_1 - \omega_0}{t_1-t_0}$.
So:
$d(\omega t) = \left\{ (\omega_0 - \alpha t_0) + 2 \alpha t \right\} dt$
is a linear function of $t$ also.

This is illustrated in the next figure, where $\omega$ varies linearly from $\omega_0$ at $t_0=56$ to $\omega_1$ at $t_1=206$. It shows that $d(\omega t)$ is not continuous and that it might exceed $\omega_0 dt$ or $\omega_1 dt$. Linear t0=56

(to continued)

Source Link
StefLAncien
  • 6.7k
  • 5
  • 20

(Incomplete answer, retro-engineering math to clarify the need)

Stripped of extra parenthesis, the recast expression looks like:

$\frac{1}{2} \left\{ \left[ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} + \textrm{Offset} \right)} +1 \right]\times \textrm{Walking} + \left(1-\textrm{Walking}\right) \right\}$

Assuming $\textrm{Offset}=0$ and $\textrm{Walking}=1$, it is reduced to:

$\frac{1}{2} \left\{ \cos{\left( \frac{1}{2} \times \textrm{frame} \times \textrm{Speed} \right)} +1 \right\}$

As is written in the question, $\frac{1}{2} \left\{ \cos{(x)} + 1 \right\}$ is cycling between 0 and 1. Furthermore, it appears that $\textrm{Speed}$ is homogenous to radian per frame. Assuming $\textrm{Speed}=0.901$ yields a period of about 14 frames (13.95 exactly, if frame count were not integer), because $\frac{1}{2} \times 14 \times 0.901 \simeq 2\pi$.

Changing/animating the $\textrm{Speed}$ will yield a discontinuity if the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ at constant $\textrm{Speed}$ is very different from the variation between $(\textrm{frame})$ and $(\textrm{frame}+1)$ with the $\textrm{Speed}$ incrementation.