I have a discretized curve represented by points containing 3 parameters (x,y,$\theta$). $\theta$ is the direction to the next point.
I want to calculate the unit tangent vector and its derivative for these points. I learned about this in Calculus III that the unit tangent vector is defined by:
$\hat{T}=\frac{\vec{v}}{||\vec{v}||}$
I decided to perform some experimental calculations to make sure I had a good grasp of the problem and this is where I've run into a problem.
My Experiment
Take two adjacent points on the line which are an arbitrary distance apart. Say that point A has a $\theta$ value of $\pi/3$ and point B has a $\theta$ value of $\pi/6$. Then what is $||\Delta\hat{T}||$?
1) Find $\hat{T}$ for point A and point B...
$\hat{T}_A$ = (cos($\pi/3$), sin($\pi/3$))
$\hat{T}_B$ = (cos($\pi/6$), sin($\pi/6$))
2) Use the forward difference to find $\Delta\hat{T}$
$\hat{T}_B$ - $\hat{T}_A$ = (cos($\pi/6$), sin($\pi/6$)) - (cos($\pi/3$), sin($\pi/3$))
3) Take the magnitude
||(cos($\pi/6$) - (cos($\pi/3$), sin($\pi/6$) - sin($\pi/3$))|| = $\sqrt{-\sqrt{3}+2}$ = 517.638E-3
4) Compare with the magnitude of the difference in radians to check my result.
$||\pi/6 - \pi/3 || = \pi/6 = 523.5987E-3$
The answer is close, but it is not exact. I've tried with other angles and this seems to be the case. What am I misunderstanding?
Edit: It seems that for small differences in angle, I will get the same result, but with a large change, my result won't be the same. I am still interested to hear what someone might say about this.
Disclaimer: I'm not well versed in discrete curves/objects...
But, from what I've read, you're computing two things that are supposed to be different. Let $\Delta\theta$ be the difference in angle between the tangent vectors. You have \begin{align*} \left\|\Delta\hat T\right\|^2 &=\left\| \hat T_B-\hat T_A \right\|^2 =\left\| \hat T_B \right\|^2 -2\left\| \hat T_B \right\|\left\| \hat T_A\right\|\cos\left(\Delta\theta\right)+\left\| \hat T_A \right\|^2 =2\big( 1-\cos\left(\Delta\theta\right) \big)\\ &= 2\left( \frac{\Delta\theta^2}2 -\frac{\Delta\theta^4}{24} +o\left(\Delta\theta^5\right) \right)\\ \left\|\Delta\hat T\right\| &=\left\lvert\Delta\theta\right\rvert \left( 1-\frac{\Delta\theta^2}{12}+o\left(\Delta\theta^3\right)\right)^{1/2} =\left\lvert\Delta\theta\right\rvert\left( 1 -\frac{\Delta\theta^2}{24} +o\left(\Delta\theta^2\right) \right) \end{align*} To summarize (and assuming I didn't screw up the Taylor series expansion [? not certain of the English name for this thing]) when $\Delta\theta$ is close to $0$, $$ \left\|\Delta\hat T\right\| \approx \left\lvert\Delta\theta\right\rvert -\frac{\left\lvert\Delta\theta\right\rvert\Delta\theta^2}{24} $$ So the smaller the value of $\Delta\theta$, the smaller the difference with $\left\|\Delta\hat T\right\|$. But these two things are strictly different.