Home > Flex, Math > Quad Hermite Curves Part 1

Quad Hermite Curves Part 1

August 18, 2009

A quadratic Hermite curve is constructed with two points (P0 and P1) and a tangent vector, T, as shown in the following diagram.

Construction of a quadratic Hermite curve

Construction of a quadratic Hermite curve

The tangent vector may be either a start (out-tangent) or end (in-tangent) vector, although it is customary to make it a start-tangent.  This type of curve is rarely used in curve construction as quad. Beziers  are often preferred when one is designing with a quadratic curve.  One advantage to this type of curve segment (that we will exploit in the future) is the simplicity of its construction.

The quadratic curve is of the form P(t) = a + bt + ct2 . The derivative is of the form, P'(t) = b + 2ct. Three equations are needed to compute the coefficients, a, b, and c. There are given by P(0) = P0, P(1) = P1, and P'(0) = T. The solution to the 3×3 system of equations is

a = P0

b = T

c = P1 – P0 – T

When computing the coefficients, the tangent vector is constructed using P0 as an origin.  Given the endpoint in the parent coordinate system, the delta between T and P0 is used in the computations.  This is illustrated in the accompanying demo.

In subsequent posts, we will look at the end tangent and how these quadratic segments can be joined (with continuity).

View demo.

View source.

Categories: Flex, Math Tags: , ,
  1. No comments yet.
  1. August 18, 2009 at 11:26 am
  2. August 20, 2009 at 6:48 am
Comments are closed.
%d bloggers like this: