COMS 4160: Problems on Curves Ravi Ramamoorthi Questions 1. - - PDF document

coms 4160 problems on curves
SMART_READER_LITE
LIVE PREVIEW

COMS 4160: Problems on Curves Ravi Ramamoorthi Questions 1. - - PDF document

COMS 4160: Problems on Curves Ravi Ramamoorthi Questions 1. Consider a quadratic B-spline curve with uniform knot spacing. Consider a segment with control points (1, 0) (1, 1) and (0, 1) in that order. What are the end-points of


slide-1
SLIDE 1

COMS 4160: Problems on Curves

Ravi Ramamoorthi

Questions

  • 1. Consider a quadratic B-spline curve with uniform knot spacing. Consider a segment with control

points (1, 0) (1, 1) and (0, 1) in that order. What are the end-points of the curve segment? What is the mid-point of the curve segment?

  • 2. Now repeat the question for a cubic B-spline curve with control points (-1,-1), (-1,1), (1,1), and (1,-1).
  • 3. Using polar forms, and your answers to the evaluations above, derive the general function f(t) for a

cubic B-spline, given it’s 4 control points. Use this to derive the 4x4 matrix used for cubic B-spline curves.

  • 4. Repeat the question above for a Bezier curve. Can you use this to derive the general Bernstein-Bezier

formula for arbitrary degree Bezier curves?

  • 5. We consider the problem of using a Bezier curve to approximate a circle. There exist efficient algo-

rithms to draw Bezier curves, so it is often convenient to reduce other primitives to them. Because of symmetry in a circle, we will consider only the positive quadrant, i.e. with arc endpoints (1,0) and (0,1). What are the control points of a quadratic Bezier curve that best approximates the quarter cicle? In particular, the end-points and tangents at those end points of the approximating Bezier curve must match those for the quarter circle. What is the maximum error in this approximation, i.e. the error at the mid-point of the Bezier curve?

  • 6. History: Bezier and B-spline curves are a paradigm for geometric modeling—more generally, the use
  • f spline surfaces. The development of geometric modeling tools to represent surfaces is a fundamen-

tal area in graphics, and continues to be a subject of active research. Which SIGGRAPH Computer graphics achievement awards have been given for the development of curve representations?

Answers

Note that these notes do not for the most part include the deCasteljau diagrams necessary in many cases to do the evaluations. These diagrams will be drawn when these questions are discussed in class. These answers are mainly guides to provide the outlines of the full solutions.

  • 1. Evaluation of quadratic B-spline curve

Consider the three control points

✂✁☎✄✝✆✟✞✡✠☞☛✍✌ , ✏✎✑✄✒✆✟✞✡✠✓✞✔✌

and

✖✕✗✄✘✆✙☛✚✠✓✞✔✌ . Define the corresponding polar form coordinates (using lower case and semicolons to

distinguish from upper case and commas for spatial coordinates) as

✛ ✁✜✄✢✆✙☛✚✣✓✞✔✌ , ✛ ✎✤✄✥✆✟✞✡✣✧✦★✌ , ✛ ✕✩✄✪✆✫✦✬✣✧✭★✌ .

Note that the number of coordinates is proportional to the degree (quadratic) and for B-splines, the numbers depend on the knot sequence, which we assume to be uniform. The end-points correspond to

✆✟✞✡✣✓✞✔✌ and ✆✫✦✬✣✧✦★✌ , while the midpoint corresponds to ✆✫✭★✮✡✦✬✣✧✭★✮✡✦★✌ . A deCasteljau diagram is perhaps the most convenient

1

slide-2
SLIDE 2

method for evaluation and will be shown in class. Here, we detail the main steps. We want to find the intermediate points

  • ✁ and
  • ✎ and the final point on the curve.

First, let us consider the left endpoint. The polar form for

✁ ✁✤✄ ✆✟✞✡✣✓✞✔✌ and it corresponds directly to the

final value sought. This is clearly given by

  • ✁✄✂
✦ ✄✆☎ ✞✡✠ ✞ ✦✞✝✠✟

(1) By symmetry, the right endpoint is given by the polar form for

✁ ✎✩✄✝✆✫✦✬✣✧✦★✌ and the value is
  • ✎✩✄✝✆✙✏✎✡✂
  • ✕✔✌
✮✡✦✑✄ ✆ ✎ ✕ ✠✓✞✔✌ .

Now, consider the midpoint. We need to use polar form

✁ ✁ ✄ ✆✟✞✡✣✧✭★✮✡✦★✌ and ✁ ✎ ✄ ✆✫✦✬✣✧✭★✮✡✦★✌ and then take

the midpoint. In this case,

✄ ☛✌☞✎✍✑✏✎☛✓✒ ✔ ✄✕☎ ✞✡✠ ✭ ✖ ✝
✄ ☛✘✗✙✍✑✏✎☛✓✒ ✔ ✄✕☎ ✭ ✖ ✠✓✞ ✝ ✚✜✛✣✢ ✄ ✤ ☞ ✍ ✤ ✒ ✕ ✄✕☎✦✥ ✧ ✠✓✥ ✧ ✝

(2)

  • 2. Evaluation of cubic B-spline curve

For the cubic curve, the polar forms are

✆✙☛✚✣✓✞✡✣✧✦★✌ ✆✟✞✡✣✧✦✬✣✧✭★✌ ✆✫✦✚✣✧✭✚✣✎✖ ✌ ✆✫✭✚✣✎✖ ✣✩★★✌

with the desired end points being

✆✫✦✬✣✧✦✬✣✧✦★✌ ✆✫✭✬✣✧✭✬✣✧✭★✌ and the midpoint ✆✫✦ ✟ ★✬✣✧✦ ✟ ★✬✣✧✦ ✟ ★★✌ .

First, consider the left endpoint. We will be interested in the 3 intermediate values

  • ✁✡✠
  • ✕ followed

by the 2 at the next step

✪ ✁✡✠ ✪ ✎ . For the left endpoint, we have polar forms ✁ ✁ ✄ ✆✟✞✡✣✧✦✬✣✧✦★✌ ✠ ✁ ✎ ✄ ✆✫✦✬✣✧✦✬✣✧✭★✌ ✠✎✫ ✁✤✄ ✆✫✦✬✣✧✦✬✣✧✦★✌ ✟

(3) We don’t care about

✁ ✕ or ✫★✎ . Now,
✄ ✦✡✏✎✬✂ ✖✁ ✭
✄ ✦✡✏✎✭✂ ✖✕ ✭ ✠

(4) and the final value

✪ ✁ ✄
  • ✁✄✂
✦ ✄ ✖✁✄✂✮✖★ ✎✬✂

(5) Similar, for the right end-point, the final value

✪ ✎ ✄ ✆✙✏✎✰✂✱✖★✖✕✡✂
✌ ✮ ✯ . Evaluating these, we obtain that

the left and right endpoints are given respectively by

✆✙✲ ✦★✮✡✭✬✠✧✦★✮✡✭★✌ and ✆✫✦★✮✡✭✬✠✧✦★✮✡✭★✌ .

Now, consider the midpoint. For these, we are interested in polar forms

✁ ✁ ✄ ✆✟✞✡✣✧✦✬✣✳★★✮✡✦★✌ ✠ ✁ ✎ ✄ ✆✫✦✬✣✧✭✬✣✳★★✮✡✦★✌ ✠ ✁ ✕✤✄ ✆✫✭✬✣✎✖ ✣✳★★✮✡✦★✌ ✟

(6) The corresponding points are given by

✄ ✖✁✄✂✴★✡✏✎ ✯
✄ ✏✎✬✂ ✖✕ ✦
✄ ★✡✖✕✄✂
✯ ✟

(7) Evaluating these, we obtain,

✄ ✆✙✲ ✞✡✠ ✦ ✭ ✌
✄ ✆✙☛✚✠✓✞✔✌
✄ ✆✟✞✡✠ ✦ ✭ ✌ ✟

(8) At the next level, the polar forms are

✫ ✁ ✄ ✆✫✦✬✣✳★★✮✡✦✬✣✳★★✮✡✦★✌ ✠✎✫ ✎ ✄ ✆✫✭✬✣✳★★✮✡✦✬✣✳★★✮✡✦★✌ , and the values are ✪ ✁ ✄
  • ✁✰✂
✖ ✄✆☎✵✲ ✞ ✖ ✠ ✞ ✞ ✞✓✦ ✝ ✪ ✎ ✄
  • ✕✄✂
✖ ✄✶☎ ✞ ✖ ✠ ✞ ✞ ✞✓✦ ✝✠✟

(9) Finally, the value we seek, which is the midpoint of these, evaluates simply to

✆✙☛✚✠✓✞ ✞✔✮✬✞✓✦★✌ .

2

slide-3
SLIDE 3
  • 3. B-spline formula

This involves some slightly involved algebra and it is a good exercise to work through it fully. A deCasteljau diagram would certainly help. Here, we outline the main steps. The four original polar forms

✛ ✁ ✠ ✛ ✎ ✠ ✛ ✕✡✠ ✛ ✏ may be written as ✆✙✲ ✦✬✣ ✲ ✞✡✣☞☛✍✌ ✠✔✆✙✲ ✞✡✣☞☛✚✣✓✞✔✌ ✠✔✆✙☛✚✣✔✞✡✣ ✦★✌ ✠ ✆✟✞ ✣✧✦✬✣ ✭★✌ .

At the next level, we obtain

✁ ✁ ✠ ✁ ✎ ✠ ✁ ✕ as ✆✙✲ ✞✡✣☞☛✚✣ ✁ ✌ ✠✔✆✙☛✚✣✓✞✡✣ ✁ ✌ ✠✔✆✟✞✡✣ ✦✬✣ ✁ ✌ . The next level will have ✫ ✁✡✠✎✫★✎ as ✆✙☛✚✣ ✁ ✣ ✁ ✌ ✠✔✆✟✞✡✣ ✁ ✣ ✁ ✌ and finally ✂ ✆ ✁ ✌✜✄ ✆ ✁ ✣ ✁ ✣ ✁ ✌ is the function we seek. Now, it is easy to go backwards and

simply find all the deCasteljau weights. We obtain the relations:

✄ ✆✟✞ ✲ ✁ ✌ ✖✁✄✂ ✆✫✦ ✂ ✁ ✌ ✏✎ ✭
✄ ✆✫✦ ✲ ✁ ✌ ✏✎✬✂ ✆✟✞ ✂ ✁ ✌ ✖✕ ✭
✄ ✆✫✭ ✲ ✁ ✌ ✖✕✄✂ ✁
✭ ✪ ✁ ✄ ✆✟✞ ✲ ✁ ✌
✂ ✆✟✞✡✂ ✁ ✌
✦ ✪ ✎ ✄ ✆✫✦ ✲ ✁ ✌
  • ✎✦✂
✦ ✂ ✆ ✁ ✌ ✄ ✆✟✞ ✲ ✁ ✌ ✪ ✁✄✂ ✁ ✪ ✎ ✟

(10) Now, upon simplification of these (which requires considering all possibilities in evaluation, or all paths in the deCasteljau diagram), we obtain

✂ ✆ ✁ ✌ ✄ ✞ ✯☎✄✝✆ ✞ ✲ ✭ ✁ ✂ ✭ ✁ ✕ ✲ ✁ ✏✟✞ ✖✁✄✂ ✆ ✭ ✁ ✏ ✲ ✯ ✁ ✕ ✂ ✖✠✞
  • ✎✬✂
✆ ✞✡✂ ✭ ✁ ✂ ✭ ✁ ✕ ✲ ✭ ✁ ✏✟✞✂ ✕✄✂ ✁ ✏
  • ✏☛✡

(11) which can be expressed using the classic

✖✌☞ ✖ matrix shown in the lecture notes, ✂ ✆ ✁ ✌ ✄ ✆ ✁ ✏ ✁ ✕ ✁ ✞✟✞ ✞ ✯ ✍✎ ✎ ✎ ✏ ✲ ✞ ✭ ✲ ✭ ✞ ✭ ✲ ✯ ✭ ☛ ✲ ✭ ☛ ✭ ☛ ✞ ✖ ✞ ☛ ✑✓✒ ✒ ✒ ✔ ✍✎ ✎ ✎ ✏ ✖✁
✖✕
✑✓✒ ✒ ✒ ✔

(12)

  • 4. Bezier formula

The bezier formula is in some sense simpler, since the original polar forms are just

✆✙☛✚✣☞☛✚✣☞☛✍✌ ✠✔✆✙☛✚✣☞☛✚✣✓✞✔✌ ✠ ✆✙☛ ✣✓✞ ✣✓✞✔✌ ✠✔✆☞✞✡✣✓✞ ✣✓✞ ✌ .

At the next level, we obtain

✆✙☛✚✣☞☛✚✣ ✁ ✌ ✠✔✆✙☛✚✣✓✞✡✣ ✁ ✌ ✠✔✆✟✞✡✣ ✞✡✣ ✁ ✌ , followed by ✆✙☛✚✣ ✁ ✣ ✁ ✌ ✠✔✆✟✞✡✣ ✁ ✣ ✁ ✌ and finally ✆ ✁ ✣ ✁ ✣ ✁ ✌ . Similar to the B-spline case, we may write down,
✄ ✆✟✞ ✲ ✁ ✌ ✖✁✄✂ ✁
✄ ✆✟✞ ✲ ✁ ✌ ✏✎✬✂ ✁ ✖✕
✄ ✆✟✞ ✲ ✁ ✌ ✖✕ ✂ ✁
✪ ✁ ✄ ✆✟✞ ✲ ✁ ✌
  • ✁✄✂
✪ ✎ ✄ ✆✟✞ ✲ ✁ ✌
  • ✎✦✂
✂ ✆ ✁ ✌ ✄ ✆✟✞ ✲ ✁ ✌ ✪ ✁ ✂ ✁ ✪ ✎ ✟

(13) Note the much more regular structure than in the B-spline case, corresponding to the classic deCasteljau

  • construction. In this case, the formula for
✂ ✆ ✁ ✌ doesn’t really require that much algebra, and we obtain ✂ ✆ ✁ ✌ ✄ ✆✟✞ ✲ ✁ ✌✣✏
  • ✁✄✂
✭ ✆✟✞ ✲ ✁ ✌ ✕ ✁ ✏✎✦✂ ✭ ✆✟✞ ✲ ✁ ✌ ✁ ✕ ✖✕✄✂ ✁ ✏

(14) whose form immediately suggests that the coefficient in front of

✖✕ is simply the ✗✙✘✛✚ term in the binomial

expansion of

✜ ✆✟✞ ✲ ✁ ✌ ✂ ✁✣✢✥✤ where ✦

is the degree of the curve. We may therefore write in general,

✂ ✤ ✆ ✁ ✌ ✄ ✤ ✧ ✕✟★ ✁ ✦✪✩ ✗✫✩ ✆ ✦ ✲ ✗ ✌ ✩ ✆✟✞ ✲ ✁ ✌ ✤✭✬ ✕ ✁ ✕ ✮✕ ✠

(15) where the first coefficient is simply the relevant binomial factor. In the particular cubic case, the relevant matrix is obtained by writing equation 14 explicitly,

✂ ✆ ✁ ✌✘✄ ✆ ✞ ✲ ✭ ✁ ✂ ✭ ✁ ✕ ✲ ✁ ✏ ✞ ✖✁✄✂ ✆ ✭ ✁ ✲ ✯ ✁ ✕ ✂ ✭ ✁ ✏ ✞ ✏✎✬✂ ✆ ✭ ✁ ✕ ✲ ✭ ✁ ✏ ✞✂✖✕✄✂ ✁ ✏
✄ ✆ ✁ ✏ ✁ ✕ ✁ ✞✟✞ ✍✎ ✎ ✎ ✏ ✲ ✞ ✭ ✲ ✭ ✞ ✭ ✲ ✯ ✭ ☛ ✲ ✭ ✭ ☛ ☛ ✞ ☛ ☛ ☛ ✑✓✒ ✒ ✒ ✔ ✍✎ ✎ ✎ ✏ ✖✁ ✏✎ ✖✕
✑✓✒ ✒ ✒ ✔

(16) 3

slide-4
SLIDE 4
  • 5. Bezier approximation of circle

Since the curve must interpolate and be tangent to the end-points, the control points are simply

✆✟✞✡✠☞☛✍✌ ✠✔✆✟✞✡✠✓✞✔✌ ✠✔✆✙☛✚✠✓✞✔✌ . The maximum error in the approximation will occur at the

mid-point. Using the deCasteljau diagram or the formula above, we know the mid-point occurs at

✖✁✄✂ ✦✡ ✎✰✂
✖ ✄ ☎ ✭ ✖ ✠ ✭ ✖ ✝ ✟

(17) The error in this approximation is the difference between this result, and the correct midpoint

✆✟✞✔✮✁ ✦ ✠✓✞✔✮✂ ✦★✌ .

This error is

☎ ✭ ✖ ✲ ✞
✝ ✄ ✭✄ ✦ ✖ ✲ ✞✆☎ ☛ ✟ ☛ ✯

(18)

  • 6. History

Actually, much of the fundamental development of curve and spline-based modeling was in place by the early 80s, so no SIGGRAPH computer graphics achievement awards have been given for spline-based modeling. However, SIGGRAPH’s highest award, the Steven Anson Coons award for lifetime achievement is itself named after Prof. Coons, who worked at MIT, for whom the Coons patch, a spline surface constructed for instance from feature Bezier curves is named. Pierre Bezier himself was given the 1985 Coons award. Inspite of the phenomenal success of spline-based surface modeling, in recent years, a new paradigm based on direct subdivision of a control mesh or polygon has become popular, and has many advantages, especially for surfaces of arbitrary topology. Pixar used spline-based modeling for Toy Story, but has since switched to subdivision methods. The original idea of subdivision goes back at least two decades to classic papers by Jim Clark (himself an achievement award winner and founder of SGI and later Netscape) and Ed Catmull (a Coons award winner and currently President of Pixar), as well as by Doo and Sabin. However, it has had a recent resurgence in popularity after remaining dormant for many years. In recognition of this paradigm, two recent SIGGRAPH achievement awards have been given for new modeling methods. Tony Derose (formerly of the University of Washington, Seattle and now at Pixar) won the 1999 award “for his seminal work in making subdivision surfaces a practical geometric modeling

  • technique. Although there are many hopefuls waiting in the wings, there are only two widely accepted

geometric primitives in computer graphics—polygons and parametric patches. DeRose’s work, and the wide range of activity that it has sparked, will surely add another primitive to the geometric modeler’s pantheon—subdivision surfaces.” Most recently, the 2003 Computer graphics achievement award was made to Peter Schroder at Caltech, for his outstanding work on multiresolution methods in geometric modeling using wavelets. 4