0
$\begingroup$

So I start with a particle rolling along the outside of a wheel. This can be constructed by setting up a vector function for a circle and adding a constant velocity to one component.

My wheel is going to be moving horizontally with a velocity v_0, so my vector is... $$ \vec{s}=(r \cos t+v_{0}t)\hat{x}+r\sin t\hat{y} $$

Now I want to implement a condition where the particle will 'bounce back' in the opposite direction once it has met a specific angle from the center. This step will change the path from looking like a flattened spring to a bent sine wave. Hopefully these pictures will help illustrate this. enter image description here enter image description here

The bottom function is a bit similar to the affect I am trying to achieve, but it is not circular. Anyway, is this just accomplished with a piece-wise function?

$\endgroup$
0
$\begingroup$

What you are looking for seems to be $$ \vec s=(r \cos(f(t))+v_0 t)\hat x+(r\sin(f(t)))\hat y \tag1 $$ where $f(t)$ is a triangle wave function. You can get formulas for such functions from various sources such as this, this, or others you can find by searching for "triangle wave function".

One way to write a triangle wave function is $$ f(x) = {(-1)^{\lfloor t/P+1/2\rfloor}}2A \left(\frac tP - \left\lfloor \frac tP + \frac12\right\rfloor \right) $$ where $A$ is the amplitude and $P$ is the period of the function. The function will oscillate between the values $-A$ and $A.$ If $P=2A$ then $f(x)$ has slope $1$ or $-1$ when its slope is defined, which seems to be what you want. Substitute this for $f(t)$ in Equation $1$ and see what you get as a result.

$\endgroup$
0
$\begingroup$

It looks like your $y$ period became twice longer. Don't change the period of the $y$ component and everything will be OK. Instead you should take negative velocity $v_0$ leaving the rest the same.

It looks also that your point moves counterclockwise when wheel moves forward. So you need to change $\sin t$ to $\sin(-t)$. When you point begin to move back you should change $\sin(-t)$ to $\sin t$ again.

$\endgroup$
  • $\begingroup$ I plotted this in segments (changing sin(t) to sin(-t) when appropriate). Here is the plot. (Pardon the odd coefficient choices- working with data). It doesn't look like the direction is changing, but I can not figure out why it wouldn't. desmos.com/calculator/6kug5qzyyj $\endgroup$ – peasqueeze Jan 26 '17 at 1:57
  • $\begingroup$ Could you, please, check with this settings: for the both curves $t\in [0,6\pi]$,for the first curve $x = r\cos t + vt, y = \sin -t$, for the second curve $x = -vt + r\cos t + (-r\cos 0 + 6\pi v + r \cos 6\pi),y = r\sin t/2$. Is that what you want to see? $\endgroup$ – lR55 Jan 26 '17 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.