Outline
- Fair Curves
- Least Squares
- Point Curve and Point Surface Distances
- Curvature and Recursive Subdivision
- Parallel Transport
Introduction
- On Tuesday, we discussed the algorithm for computing Voronoi Diagrams in more detail and gave pseudo-code.
- Then we began talking about curvature of curves and surfaces in 2D and 3D.
- We said one of the motivations behind looking at curvature was in that it could allow us to come up with
more succinct representation of things like elevation grids, as well as to come up with better normal maps etc.
- Today, we continue our discussion of curvature by talking about curve aesthetics in terms of curvature
and giving a couple of algorithms related to curvature.
Fairing Curves
- At the start of this semester we looked at various kinds of Bezier and spline curves and surfaces.
- Their properties made them a natural candidate for representing a variety of figures.
- One might ask the general question: Can more come up with a definition of what it is that makes a curve pleasing or
useful for modeling?
- Although there is no perfect answer to this question, some general properties you might like are connected to curvature:
Definition. A curve `\vec p(u)` is said to be fair if
- it is `G^2` continuous,
- it has no undesirable inflection points
- its curvature varies in an even way
- Another way to look at (3) is if we plot the extrema of the curvature function we hope that the curve has relatively few extrema and they are separated.
- The point in having curves which are fair, is that they can be approximated nicely by things like lines, planes, spline curves, spline surfaces, etc.
- Given a curve that is not fair, the process of converting it into a "fair" curve is called fairing.
- Since curves are often presented in terms of point data, a set of point data is said to be fair if there exists a fair curve that interpolates these points.
- Two common techniques for trying to find fair curves that approximate a set of points are least squares fitting and energy function approaches.
Least Squares Fitting and Energy Function Approaches
- In the least squares fitting approach, one takes a known fair curve `\vec p(u)` (for instance, you could imagine `vec p` to be a line) which is defined in terms of some adjustable coefficients (say `vec a_i`).
- One then adjusts these coefficients so as to minimize the sum of the distances from each of the points `vec v_j` we are trying to approximate and the fair curve. I.e., we want to minimize `sum_j ||vec v_j - vec p||^2`.
- Such a minimization can be done by trying to find the zeros of the derivative of this sum via a steepest descent method.
- In the energy function, approach we have a space of fair curve which are specified in terms of an energy functions of the points we are approximating. We want to find the curve from that space of least energy.
- This is a well-known problem from the calculus of variations and there are numerical methods for versions of it.
Finding Where a Curve or Surface Comes Closest to a Point
In both of these approaches, one important tool one needs is to be able to find the nearest point on a curve to a given point from the sample set.
Given a curve `\vec q:[a,b] \rightarrow \mathbb{R}^3` and a point `\vec p` this amounts to solving the equation:
`(\vec p - \vec q(u))\cdot vec q'(u) = 0`.
To see this note that when the distance is minimized then the vector `(\vec p - \vec q(u))` will be normal to the curve and so perpendicular to its tangent `vec q'(u)`.
A Newton-Raphson style descent method can be used to find this minima.
This same argument can be used to find the closest a surface comes to a point (say you wanted to approximate a set of point by the fair surface given by a plane). Basically, one wants to solve the equations:
`(\vec p - \vec S(u,v))\cdot del_u vec S(u,v) = 0`
`(\vec p - \vec S(u,v))\cdot del_v vec S(u,v) = 0`
Curvature and Recursive Subdivision
- So far we have looked at how to approximate a set of points with a given fair curve or surface.
- Often we start off with a spline or more general curve or surface, and we keep subdividing it until we can approximate it
with a simple fair curve like a line or a plane.
- When we did this for Bezier curves in the cubic case, we did an estimate based on the distance of the midpoint `\vec q(1/2)` of the Bezier curve from the chord given by its endpoint `vec p_0, vec p_3`.
- In general, the stopping point is determined by the curvature of the curve or Gauss curvature of the surface of the region one is subdividing. But in practice one can approximate this curvature by using the chordal deviation. Let `[vec a, \vec b]` denote the line segment (chord) between these points
Definition. The value of
`max_(u\in [c,d])dist(\vec p(u), [\vec p(c), \vec p(d)] )`
is called the chordal deviation of `\vec p(u)` over `[c,d]`.
- To approximate this maximum you can pick a few `u` at random in the interval and take the maximum.
Parallel Transport
- Recall on Tuesday, we used, the unit tangent to a curve `vec T(t)`, its derivative divided by the curvature `\vec N(t)`, and their cross product `vec B(t)` to give a frame of reference at a point on a curve.
- This is called the Frenet frame.
- The problem with this frame is that it is not defined when the curvature vanishes.
- Suppose we instead start with an arbitrary orthonormal basis `(vec T(t_0), vec n_1(t_0), vec n_2(t_0))` at time `t_0` and try to propagate this along our curve by rotating it based on the way `T(t)` rotates as it moves, independent of the curvature.
- Such a frame when made precise will be called a parallel transport frame.
- These will be useful when we discuss geodesics.
How to compute Parallel Transport Frames
- Our goal is for a sequence of point `vec p(t_i)` to come up with a parallel transport frame `F(t_i)`.
- Suppose we already have the frame `F(t_(i-i)) = (vec T(t_(i-1)), vec n_1(t_(i-1)), vec n_2(t_(i-1)))`
- Let `theta_i` be the angle between `vec T(t_(i-1))` and `vec T(t_(i))`.
- Let `\vec w_i = vec T(t_(i-1)) \times vec T(t_(i))` be the unit vector that is orthogonal to the plane generated by `vec T(t_(i-1))` and `vec T(t_(i))`.
- Then `F(t_i)` is the frame obtained by rotating `(vec T(t_(i-1)), vec n_1(t_(i-1)), vec n_2(t_(i-1)))` about `vec w_i` through an angle `theta_i`.
Properties of Parallel Transport Frames
Definition. A vector field along the curve `\vec p(t)` is a vector valued function `vec X:[a,b] \rightarrow \mathbb{R}^3`. The vector field is `vec X` is tangential or normal to `\vec p(t)` if the vectors `vec X(t)` and `\vec p'(t)` are parallel or orthogonal respectively.
Definition. A normal vector field `vec X` along the curve `\vec p(t)` is said to be relatively parallel to `\vec p(t)` if `\vec X'(t)` is a tangential vector field.
The motivation for the last definition is that it turns out that a vector field `vec X` is relatively parallel to `\vec p(t)` iff
`\vec p(t)` and `vec q(t) = \vec p(t) + vec X(t)` are parallel curves.
One can also show that if `c\in[a,b]` and `vec v` is any vector, then there is a unique relatively parallel normal vector field `vec X(t)` to `vec p(t)` with the property that `vec X(c) = vec v`.
Definition. A tangential vector field `vec X` along the curve `\vec p(t)` is said to be relatively parallel to `\vec p(t)` if there is a constant`\vec X'(t) = cT(t)` for all t.
Definition. A triple `(vec T, vec n_1, vec n_2)` of orthonormal relatively parallel vector fields along `vec p(t)` is called a relatively parallel adapted frame field for `\vec p(t)`
One can show that given any `c\in[a,b]`. Any frame `(vec T(c), vec u_1, vec u_2)` at `vec p(c)` defines a unique relatively parallel adapted frame field `(vec T, vec n_1, vec n_2)` so that `vec n_1(c) = \vec u_1` and `vec n_2(c) = \vec u_2`.