Pomax
2013-02-27 22:03:24 UTC
In a post in 2004 (hurray for archives), Dave Eberly explained why you can't
have a polynomial offset curve be itself a polynomial. His post read:
"Generally, y, if you start with a polynomial curve and try to offset, the
result will no longer be a polynomial curve. The idea is as follows for a
planar curve.
"Let et the planar curve be parameterized as P(t). A unit-length tangent
vector is T(t) = P'(t)/|P'(t)| where P'(t) is the derivative of P (t) and
|P'(t)| is the length of the derivative. In the plane, you can write T(t) =
(cos(A(t)),sin(A(t))) for some angle A(t). A unit- length normal is N(t) =
(-sin(A(t)),cos(A(t))) and is oriented to point to the "left" of the curve as
you traverse it in the tangential direction.
"Let et Q(t) be a curve that is to be "offset" from P(t) by a constant
distance r. The offset is presumed to be in the normal direction, so you want
Q(t) = P(t) + r*N(t). If P(t) is a polynomial curve, the only way for Q(t) to
be a polynomial curve is if N(t) has polynomial components. Now notice that
the components of N(t) are the components of T(t), and the components of T(t)
are polynomial terms [P'(t) has polynomial components] *divided* by the
length of P'(t), a term that is not generally a polynomial. When the length
is not a polynomial, neither is Q(t)."
Reading this seems to imlpy that the offset can be polynomial in those cases
where |P'(t)| is polynomial. If P(t) is cubic or quadratic, then P'(t) is
quadratic or linear, respectively. In either case, we can compute |P'(t)|
symbolically using the standard fact that |P'(t)| is equal to the bounded
integral from 0,1 for sqrt(px''(t)² + pxy''(t²)). For cubic functions, that
gives an integral of the form {sqrt(linear² + linear²)} = {sqrt(quadratic)} =
{linear} --> integrand is quadratic, for quadratic functions we get {sqrt
(constant² + constant²)} = {sqrt(constant)} = {constant} --> integrand is
linear. In either case, the length is polynomial, and so I would imagine that
there is a polynomial offset curve possible.
From some CAD experiments it's clearly impossible to offset a curve by
another curve of the same degree, but it does appear that a curve B(n,t)
might be reasonably offset with a higher curve B(n+k,t) for some 1<=k
What am I missing?
- Mike "Pomax" Kamermans
have a polynomial offset curve be itself a polynomial. His post read:
"Generally, y, if you start with a polynomial curve and try to offset, the
result will no longer be a polynomial curve. The idea is as follows for a
planar curve.
"Let et the planar curve be parameterized as P(t). A unit-length tangent
vector is T(t) = P'(t)/|P'(t)| where P'(t) is the derivative of P (t) and
|P'(t)| is the length of the derivative. In the plane, you can write T(t) =
(cos(A(t)),sin(A(t))) for some angle A(t). A unit- length normal is N(t) =
(-sin(A(t)),cos(A(t))) and is oriented to point to the "left" of the curve as
you traverse it in the tangential direction.
"Let et Q(t) be a curve that is to be "offset" from P(t) by a constant
distance r. The offset is presumed to be in the normal direction, so you want
Q(t) = P(t) + r*N(t). If P(t) is a polynomial curve, the only way for Q(t) to
be a polynomial curve is if N(t) has polynomial components. Now notice that
the components of N(t) are the components of T(t), and the components of T(t)
are polynomial terms [P'(t) has polynomial components] *divided* by the
length of P'(t), a term that is not generally a polynomial. When the length
is not a polynomial, neither is Q(t)."
Reading this seems to imlpy that the offset can be polynomial in those cases
where |P'(t)| is polynomial. If P(t) is cubic or quadratic, then P'(t) is
quadratic or linear, respectively. In either case, we can compute |P'(t)|
symbolically using the standard fact that |P'(t)| is equal to the bounded
integral from 0,1 for sqrt(px''(t)² + pxy''(t²)). For cubic functions, that
gives an integral of the form {sqrt(linear² + linear²)} = {sqrt(quadratic)} =
{linear} --> integrand is quadratic, for quadratic functions we get {sqrt
(constant² + constant²)} = {sqrt(constant)} = {constant} --> integrand is
linear. In either case, the length is polynomial, and so I would imagine that
there is a polynomial offset curve possible.
From some CAD experiments it's clearly impossible to offset a curve by
another curve of the same degree, but it does appear that a curve B(n,t)
might be reasonably offset with a higher curve B(n+k,t) for some 1<=k
What am I missing?
- Mike "Pomax" Kamermans