Hello to all readers. I just decided to write an article on differential geometry of curves. In my opinion, the topic of "continuous" mathematics will be useful to most Habr readers, at least for the next hour =), given that this is an IT resource, and IT is somewhere closer to discrete mathematics (again, in my imperfect view). But in some places, I know for sure there is not only a discrete one, for example, CAD design systems have engines built on differential geometry (well, of course, not just one, and computational geometry is there, and so on). Perhaps itβs used in games, I donβt know. After all, a game is usually a movement, and to describe a movement it would be nice to know the geometry.
Introduction
Differential geometry of curves (as the name implies) deals with the geometry of curves, but using methods of differential calculus, or matanalysis.
For those who set the curves only on the plane, in this form:
I will say that this is not the best way, that is, it is not universal, but it may be inconvenient (for spaces of higher dimension). It is possible, of course, and so, it will be good for your tasks, but in general, the curves are set in parametric form. Because if you set this way already in 3D space, you get something like:
\ begin {equation *}
\ begin {cases}
z = 2x-y,
\\
z = x ^ {2} + y ^ {2}
\ end {cases}
\ end {equation *}
and even so:
\ begin {equation *}
\ begin {cases}
z = 2x-y,
\\
y = x ^ {2} + z ^ {2}
\ end {cases}
\ end {equation *}
What can be interpreted as the intersection of two arbitrary surfaces. It is the intersection that sets the spatial curve for us. And another circle example:
\ begin {equation *}
\ begin {cases}
x ^ {2} + y ^ {2} + z ^ {2} = 1,
\\
x + y + z = 1
\ end {cases}
\ end {equation *}
Picture for a better understanding of what happens when you cross
And you ask why these methods are similar. Well, look, in the plane we have in general the implicit specification of the curve F(x,y)=0. Then in 3D space, by analogy, I want to write down the equation by adding one coordinate F(x,y,z)=0. But all the same it turns out not a curve, but a surface. Then if you add another equation, you get a system, or two surfaces:
\ begin {equation}
\ begin {cases}
F (x, y, z) = 0,
\\
G (x, y, z) = 0.
\ end {cases}
\ end {equation}
which, generally speaking, may not intersect, because arbitrary F and G not always give a curve.
Therefore, let us rather move on to the parametric assignment of curves.
Curve Parametric
βDefine a curve parametricallyβ means to specify the coordinate of each point on the curve. That is, each coordinate individually will be a function of the general parameter.
\ begin {equation *}
\ begin {cases}
x = x (t),
\\
y = y (t),
\\
z = z (t).
\ end {cases}
\ end {equation *}
This thing is usually called the radius vector. vecr(t)=(x,y,z). Or, to be more precise, more correct as follows:
vecr(t)=(x,y,z)T=beginbmatrixxyzendbmatrix
A regular vector is a column vector, or a transposed row vector. If we go into the wilds of tensor analysis, then column vector = vector, and row vector = covector. But this does not matter to us, because anyway, in the orthogonal normalized basis, in which we work, the difference between them disappears. Next, I will write the vectors into a string, it does not affect anything, but compactly it turns out.
By the way, if you look at system 1, and for convenience, indicating, for example, z=t :
\ begin {equation *}
\ begin {cases}
F (x, y, t) = 0,
\\
G (x, y, t) = 0.
\ end {cases}
\ end {equation *}
then formally solving this system of equations with respect to x,y , we obtain a solution depending on the parameter \ {x (t), y (t) \}\ {x (t), y (t) \} . And now, if everything is combined into one vector:
\ begin {equation *}
\ begin {cases}
x = x (t),
\\
y = y (t),
\\
z = t
\ end {cases}
\ end {equation *}
we get some parameterization of the curve, until recently, given as the intersection of surfaces.
Well, for example, a helix:
\ begin {equation *}
\ begin {cases}
x = cos (t),
\\
y = sin (t),
\\
z = t
\ end {cases}
\ end {equation *}
Helix
Here in the picture is the parameter t runs over values ββfrom 0 before 4pi . By the way, with the sentence earlier, I said βsome parameterizationβ. And this is no accident. Because there can be infinitely many parametrizations of this particular helix.
For example, the same line:
\ begin {equation *}
\ begin {cases}
x = cos (t ^ {2}),
\\
y = sin (t ^ {2}),
\\
z = t ^ {2}
\ end {cases}
\ end {equation *}
this is the same helix, and the picture will be the same (I will not insert it again), however, t runs over values ββfrom 0 before 2sqrtpi .
Anyway, making a replacement t=g(tildet) , it will be the same helix (provided that g(tildet) - monotonous):
\ begin {equation *}
\ begin {cases}
x (\ tilde {t}) = cos (g (\ tilde {t})),
\\
y (\ tilde {t}) = sin (g (\ tilde {t})),
\\
z (\ tilde {t}) = g (\ tilde {t}).
\ end {cases}
\ end {equation *}
We will talk more about parameterization later, and about a special parameterization called βnaturalβ, but already in the following articles (maybe).
Derivative and tangent vector
And now, it's time to start the differential analysis of the curves. Donβt worry, the definition of the derivative of the vector will slip quickly;) So, here we have a vector depending on the parameter t : vecr(t)=(x(t),y(t),z(t)).
You can write it laid out on a basis: vecr(t)=x(t)veci+y(t)vecj+z(t)veck .
And the derivative, as usual, is defined as the limit:
Well, even the figure shows where Deltat not even rushed to zero that this vector dotvecr is tangent to the curve. In the theory it is interpreted as speed and is designated as follows:
dotvecr=vecv,
and the curve itself, respectively, as the trajectory of the motion of the material point, but we will talk more about this later.
So, this vector vecv is tangent to our curve everywhere except for singular points (in the sense that at singular points of the tangent vector it may not exist). But there are so few of them that let's not even talk about them yet. And it turns out that our vector vecv there is a basis for our curve, it shows where the curve goes further. Therefore, it would be better to make it single as all other unit vectors. Just divide by its length and designate as usual:
And now, for the sake of fun, this equality can be differentiated, both the left and right sides (in general, in such matters, if you donβt meet anything, itβs better to differentiate just in case):
fracdlanglevectau,vectaurangledt=fracd(1)dt,
on the right, of course, zero. But on the left, we differentiate the scalar product of vectors. Given the rules of differentiation of scalar, vector products and other things (which are not at all difficult to prove, even having only what is written above in this article):
here we also took into account the symmetry property of the scalar product, and from there the two got out:
langleveca,vecbrangle=langlevecb,vecarangle.
Well, now you can draw conclusions. The last scalar product is zero. And this happens only when either at least one of the vectors is zero, or they are perpendicular. Since our vectau completely arbitrary (why do we all do this? To calculate the tangent vector for absolutely any curve), we conclude that the derived vector from the unit tangent is always perpendicular to it, located at an angle 90circ :
vectauperpdotvectau.
Fine. This derived vector can be called the normal vector to our curve. But we want him to be single too, and this is completely optional at the moment. Therefore, we simply divide by its length, then it certainly will not go anywhere:
and weβll deal with the first one just by differentiating as a complex function:
fracd(vβ1)dt=(β1)vβ2fracdvdt,
here v=sqrtdotx2+doty2+dotz2=sqrtlanglevecv,vecvrangle Is the module of our velocity vector, a scalar function, therefore we will simply further differentiate it as complex:
Everything seems to be ready, but it feels like something is missing ... Our curve lives in three-dimensional space, where the number of basis vectors should be 3. We have so far received two perpendicular unit vectors. Well, no question, the third is easy to obtain using the vector product of the first two. Moreover, it will be perpendicular to the original one, and plus another unit, since the tangent and normal are single. People before us called it βbinormalβ:
vecb=left[vectau,vecnright],
but in order not to injure the psyche with a triple vector product, let's write the normal vector in this form:
Where phi=fracpi2 - angle between vectors vecv and left[dotvecv,vecvright] . Naturally, it is direct, since the vector left[dotvecv,vecvright] perpendicular to its parents, so to speak.
Well now thatβs it, we got expressions for calculating the tangent, normal, and binormal vector for arbitrary parameterization of the curve. Let's write them all together:
Here we edited the normal vector a bit so that everything was in a good tone. That is, they rearranged in the inner bracket of the vector, and in the outer. Twice, because the sign remained the same.
Example
Curve "helix" and its vector: tangent - red, normal - green, binormal - blue