# Curves

Note: by , we indicate an Euclidean geometrical space, i.e. space of (geometric) points with an origin and equipped with a normed vector space.

## 1- Parametrized smooth curves

Definition: a parametrized smooth curve is a function where is an open interval in extended and is a smooth function.
Note that a parameterized curve (always smooth) is referred to the function , not to the function image , which is a set of points in .
By a curve we mean parametrized smooth curve unless otherwise stated. A curve in means a curve (function) whose image is in .

Definition: a parametrized curve is a reparametrization of the curve if there is a smooth bijection such that the inverse map is also smooth and . Note that . This indicates that is also a reparametrization of . Also note that is monotonic. If decreasing, we have . This indicates that reparametrization can change the relative direction of a curve.

Curves with different reparametrizations have the same image and hence the same geometrical properties.

Note: #### Arc length and unit speed curves

For any parameter , .

The arc length function is defined as:

That can be negative or positive depending on is larger or smaller than .

From a physical point of view, the trajectory of a moving point can be represented by a curve, therefore, the speed of a moving point along a curve (defined as the rate of change of its distance along the curve ) is:

\frac{ds(t)}{dt}=\|\dot{\gamma}(t)\|\in\R

A unit-speed curve is by definition is a curve with , i.e. is a unit vector. In applications for the sake of geometry, not physics, the speed of a curve is not important, therefore, considering a unit-speed parametrization of the curve is shown to simplify formulas and proofs. For example the following useful proposition is often useful in proofs:

Proposition: let be a smooth function of , then meaning that is either perpendicular to or zero for all . Proof by considering . In particular, the proposition is true for when the curve is unit-speed.

Definition: A point of a curve [latext]\gamma[/latex] is called a regular point iff ; otherwise a singular point. A regular curve is a curve iff all of its points are regular.

Propositions: A reparametrization of a regular curve is regular and the arc length function of a regular curve is smooth. A regular curve has a unit-speed reparametrization, and a unit-speed curve is a regular curve. The arc length (s) is the only unit-speed reparametrization of a regular curve (actually for some constant c).

From above, the tangent vector (and speed of an object moving along a regular curve; it’s moving, not stationary) does not vanish at any point.

## 2- Curvature and torsion of a curve

The curvature is a measure of an extent to which a curve (geometric object) is not contained in a straight line. This impose zero curvature for straight lines. Torsion quantifies the extent to which a curve is not contained in a plane. Hence, plane curves have zero torsion.

To find the measure of curvature, a plane curve is considered. The results can easily be extended to curves in and higher dimensional curves (by extending the definition).

Let be a unit-speed curve, i.e. and . For any parameter value corresponding to a point , any changes in the parameter gives another point of the curve . The distance between latter point and the tangent line at the former point is (the distance between a line and a point), is defined as the shortest distance between the line and the point. This is the length of the perpendicular line segment from the point to the tangent line. Therefore, a measure of distance is where is the unit vector perpendicular to the tangent line ( ). This is a signed distance. By Taylor’s theorem:

\gamma(t+\Delta t)= \gamma(t) + \dot\gamma(t)\Delta t + \frac{1}{2}\ddot\gamma(t)(\Delta t)^2 + O(\Delta t)^2

Therefore, . Because is a unit-speed curve we have ; which indicates . Therefore:

(\gamma(t+\Delta t)- \gamma(t))\cdot \hat n \approx \pm \frac{1}{2}\|\ddot\gamma(t)\|(\Delta t)^2

So the magnitude of the distance, i.e. indicates the deviation of the curve from its tangent line (at a particular point). For a fixed deviation in the parameter, and consequently in the point, the quantity expresses the scale of the deviation from the tangent line which is a straight line. This suggests the following definition:

Definition: for a unit-speed curve , its curvature is defined as .

For any regular curve (which always can be reparametrized to a unit-speed curve), the curvature at a point is the magnitude of the rate of the change of the unit tangent vector at that point. For a unit speed curve, its simply . For a general regular curve in though:

\kappa(t):=\frac{\|\ddot\gamma(t)\times\dot\gamma(t)\|}{\|\dot\gamma(t)\|^3}

#### The direction of The direction of is in the sense of the direction of the turning of the curve when tracked in its forward direction. The forward direction of a curve is the sense of moving from one point to the next point. The next point of a point is for positive or negative .

The curvature of a straight line is zero and though s.t. being a constant.

# Inquiring into a triangular mesh

All codes are written in Python and based on 3D plotting and mesh analysis library PyVista.

## Cells connected to a node

To speed up finding the cells connected to a node, I initiate a dictionary with items {pointId : {cellIds}}. Using a set for cellIds leads to quick update and allows union properties of sets.

numOfPoints = mesh.n_points
meshPointIds = range(numOfPoints)
meshCells = mesh.faces.reshape(-1, 4)[:, 1:4]
pntIdCellIdDict = {pntId: set() for pntId in meshPointIds}
for cellIndx, cell in enumerate(meshCells):
for pntId in cell:
pntIdCellIdDict[pntId].update({cellIndx})