 In this lecture we're going to get to something very important and actually quite a bit of fun, curvature. I'm going to import everything that I need, first of all for curvature. My usual pretty printing for sympi, ignoring all those ugly pink warnings. I'm going to make a reference frame and I'm going to call it C and I'm going to introduce a mathematical symbol T. Let's look at curvature. Curvature tells us how much the direction of the velocity vector changes per arc length of a motion path. Now think about this a little bit. Actually I think when I show you this little picture it'll make more sense. Now imagine this blue road is a road a car travels in. Now imagine it travels at the exact same speed. If it looks on this pedometer it stays. Yeah at the bottom here it's a very gentle curve and we see at each point these little orange points we see the velocity vectors, instantaneous rate of change there at a constant speed though. Those two will be the same magnitude, they're just different directions. And the car won't slip from the road I suppose there but if we get to the top here there's quite a sharp bend. Quite a sharp bend. If the car doesn't slow down it might even go off the path. It might even leave the road. And if you look at these two orange dots at the bottom and these two at the top, the arc length between these two now this is just a hand drawing. This is not 100% discovered. Imagine the arc length, the distance. If I just travel along the blue line from that one to that one and from this one to this one is exactly the same. If I look at these two green velocity vectors and I look at these two red velocity vectors there's quite a bit more change in the velocity vectors these two red ones as opposed to these two down here. So for the same arc length, for the same length of this blue bit that length equaling this length up here there's a lot more change in this velocity vector from that little bit of arc than from this little bit of arc. Curvature tells us this rate of change of a velocity vector let's make it a unit velocity vector. So I take that vector and divide it by its magnitude so just imagine these are just unit vectors. So it's a rate of change in those unit vectors per arc length. Now so it doesn't matter anymore I can drive fast here and then I can stop the car and I can go slowly around this bend so that I don't skid off the road. So it's got nothing to do with the pace at which I'm travelling there. This is a rate of change of those tangent velocity vectors make them unit vectors per arc length not per speed or per velocity or anything like that. That gives us curvature. You can just intuitively see that this curvature there's more curvature here than there is down here but we need a mathematical way to say how much curvature there is. First of all before we get there we need to define this tangent normal vector. What does that mean? It means the velocity vector at that point divided by its norm. So that becomes a unit vector in the direction of that instantaneous velocity vector and I'm going to call that we're going to call this T. We call it the unit tangent vector. I should say I hope I didn't call it something else before. The unit tangent vector. So it's a tangent to the path there and it's a unit vector. Now pay particular attention later on we're going to learn what the tangent normal coordinate system is. We know what the Cartesian coordinate system is but one of the body coordinate systems is the tangent normal coordinate system that you're going to learn a lot about and for that you need this. You need this unit tangent vector. It is nothing special. It is the unit vector in the direction of the velocity vector at any point and there it is. Really nothing difficult. Let's do an example. I've got four times the cosine of T in the x direction of my C coordinate system and four times the sine of T in the y direction and if I just print that to the screen I shouldn't do that. Otherwise Python is not going to execute any of my code. There we go. Four times the cosine of T and four times the sine of T in the x and y directions. I remember my old friend this arc length equation. It is the definite integral in going from some initial to some final time of the square root of the first derivative square of the other component with respect to u. That's usually how we write it. Let's do that. Imagine we have this position vector in time. This is going to trace out a little arc for us. We can see it's going to be a circle but anyway it's going to trace out an arc this position vector as time goes on and between two bits of time I want to know what the arc length is. What the arc length is. That means I'm going to do integration here so I better break up this one into two separate computer variables. I've called it r underscore x and r underscore y. That's just the four cosine T there. Four times cosine T there, four times sine. So I've just broken it up. I'm going to get the first derivative because I need the first derivative squared. So I'm getting the first derivative of each of them. My integrand is now the square root of this one squared times the other one squared. This is a long way and now I just want to integrate my integrand with respect to T going from zero to T and that will give me the s of T. If I were to run that I get this I know from my trigger identity this is going to be one so I can say simplify s of T just using normal python and that leaves me with four of T. So my arc length going from zero to T is just going to be so that's very simple to do. I know I can this is a quick reminder actually how to do arc length. Very easy to do from this equation here. Now let's define curvature. It's given this Greek letter kappa and it is the norm so it is a scalar of the rate of change of the unit vector with respect to arc length dT dS Look again. How much this unit vector changes which we've just introduced here the unit tangent vector. How much it changes per arc length. For that bit of arc length there's not much change or at least not as much as look at these two red ones. I mean there's a huge difference if they both normal vectors I mean there obviously the magnitude is the same but there's a huge change in direction. There's more curvature there than there is there. So that's how we define this. There's a rate of change of this unit tangent vector per arc length. Can we get a better equation for this because that's not the kind of derivative that you'll just be able to do. It's very easy look at this. There's my definition kappa equals this norm of dT dS. If I were to take the first derivative with respect to T of the T of T this unit tangent vector and I just do it like this is dT dS times dS dT. Now I've got to be a bit careful there. This really only works in two dimensions but later we extrapolate it to three then don't be too concerned about it. Just think I'm doing implicit differentiation here. So it's dT dS times dS dT and in two dimensions it's really like you can cross out these two dS's and you're still left with dT dT dT dT dT dT capital T dT. Don't worry about that. In other words if I get dT dS on its own I take this dS dT and I bring it to the denominator on this side so that would hold simple algebra for all this upside down A for all dS dT not equal to zero I can't divide by zero so dS dT is arc length divided by time that's the speed so it can't be zero speed that's what I'm saying just being mathematically rigorous there. So kappa now remember dT dS is kappa so kappa is this but I know that dS dT is the norm of the r prime of T. Speed is just the norm of the velocity vector in other words kappa is the norm of T prime of T divided by the r prime of T so we've just seen how to do T remember T is just the unit velocity vector so it's the rate of change of the velocity vector by the norm of the velocity and that gives us kappa so it's a very simple setup there go through it again really there's nothing to it there's another equation for kappa which is sometimes a lot more useful I'm going to show you what it looks like but it's going to be a couple of lectures before I show you the derivation of the other form for now this is the one we want now let's look at an example so I'm just going to introduce these mathematical symbols AC and E to just represent some constants I have this position vector AT in X direction CT in the Y direction, ET in the Z direction that's linear and T linear and T linear and T so this is a straight line just think about it would a straight line have a curvature I bet you it doesn't I mean it's a straight line but let's see let's just make sure so V of T is going to be the first derivative of that which is simply AC and E what do I need well I need that's magnitude of velocity in my denominator I need the velocity which if I get I call speed it's just the magnitude of the velocity vector which is now just A squared plus E squared E squared remember what T was my unit tangent vector that was the velocity vector divided by its norm there we go that's my T of T T prime of T I just take the first derivative of that and that becomes my numerator which I'm going to call kappa numerator it's magnitude there simple enough to do so T prime of T is the first derivative of T of T and in the numerator I'm going to take its magnitude the denominator takes speed so kappa is just going to be kappa num divided by speed and if I were to run that lo and behold I get zero which is to be expected because the initial parametrized position vector was a straight line no problems there you can do this in a variety of ways you can give it different values you can do it all in one but if you go through it slowly you'll see this makes sense and this is one way to do it let's do another one for fun quickly so I have a much more complex path there some form of a spiral I need the velocity first of all of that velocity I make the unit tangent vector by dividing the velocity vector by its magnitude T prime would just be the first derivative of T kappa is just going to be TT prime's magnitude divided by VT's magnitude which was the speed and if I look at that the answer is going to be 1 over 10 now let me quickly so that gives us curvature let me quickly just show you there's a whole other way of doing it I don't know if I should really introduce this example because I'm not going to show you this equation and I'll show you right at the bottom what it looks like but we're going to derive it in a later video and sometimes when you're given something like the you're given different values in your problem to solve sometimes this alternate form more difficult form of the might be easier to use so for that I need not only velocity and position but I need acceleration also so I'll just get the acceleration vector same position vector as we had before I'm going to now take the cross product of the velocity and the acceleration vector and that's going to be the numerator or the numerator at least is going to be the magnitude of that I should say the denominator is going to be the magnitude of the velocity vector cubed to the power 3 and now if I get kappa I get this massive solution here and if I just simplify that again I'm going to end up with 1 over 10 so I do 1 over 10 with a simple equation there 1 over 10 with a difficult one there very difficult to run through here so you're not going to understand this until I show you the equation but just to show you there are two ways to get to 1 over 10 fun thing what is the radius of curvature let me just go back up radius of curvature is if I have the curvature here I imagine I can put a circle there this circle will have a much bigger radius there then this tiny little circle that will fit in but every point will have its own curvature its own radius of curvature radius of curvature is just the reciprocal of the curvature over kappa so for our previous example it was going to be no matter which way I do this was going to be 10 so radius of curvature at any point there remember now its going to be the same because this was a spiral initially so its going to have the same there's not going to be t the variable t is not going to appear in every spot its going to have the same radius of curvature radius of curvature is just 1 over the curvature let me get closer to this second example I'm going to show you the equation for it now but not how to derive it but let's imagine that we have a position vector and its parameterized by letting x equal to t that makes y equals the f of t I should say for this curve y for f of x if we then parameterize it to x equal t we're going to have this the r of t equals t and the f of t and let's make it in two dimension its in a plane so nothing is going to happen if I take the first derivative of that to get velocity the first derivative of t is 1 the first derivative of f of t with respect to t is f prime of t first derivative of 0 is 0 and there's the second derivative and lo and behold here we get to this other form of kappa it's the norm of the velocity cross acceleration I did it up there divided by velocity cubed so if I were to get this cross product of this and this divided by this I'm not doing the derivation but this is what it ends up with it is the norm of the second derivative of the f of t over 1 plus the square of f prime of t all to the power 3 over t so this is the other way you're going to do this parabola I'm just going to show you something quickly let's look at a parabola don't worry about that of course you'll have to memorize this if you don't learn how to derive it I'll show you the derivation in another video then you've got a lot of ways to calculate curvature so let me just introduce these symbols a b c and x and I have a function I'm going to call f the mathematical variable f is now function and the function is going to be a t squared plus b t plus c what is that? it's a parabola nothing other than a parabola now using this other format of getting the curvature let's just get f prime and f double prime in other words first and the second derivative of that parabola my numerator is f prime prime it's up there divided by 1 plus f prime squared times to the power 3 over 2 so that would be I hope I've run all of these have I? kappa is now this that is my curvature now think about it if you have a parabola what happens as x or t it's t versus y what happens if t goes to infinity well on the y axis that thing is going to climb almost straight up it's going to turn into almost a straight line and what is the curvature of a straight line this is kappa my curvature I'm just calling the curvature when t approaches infinity kappa dot limit that means I take the limit as t approaches infinity and lo and behold that curvature is going to be 0 that curvature is going to be 0 just think of a parabola as t approaches infinity it's going to go straight up in the air almost the curvature is going to be 0 so that's a lot of fun with curvature your introduction to curvature is really not that difficult you've got two equations three almost I should say although these other two are basically the same thing there if you take the cross product this is what you can end up with so you've got these two this one and the top one two equations now for curvature and you better still you understand what curvature is all about and simply the radius of curvature is just 1 over the curvature very simple