It's free to join Gamasutra!|Have a question? Want to know who runs this site? Here you go.|Targeting the game development market with your product or service? Get info on advertising here.||For altering your contact information or changing email subscription preferences.
Registered members can log in here.Back to the home page.

Search articles, jobs, buyers guide, and more.

By Gabe Kruger
Gamasutra
June 11, 1999

Letters to the Editor:
Write a letter
View all letters


Features

 

Contents

Introduction

On Lines

Connect the Curves

Rendering Bézier Curves

Divide and Conquer

Code Listing 2

Bézier Patches

Rendering Bézier Patches

Advanced Patching

Not All is Perfect

Connect the Curves

Usually one curve is not enough to describe what you want. Because Bézier curves pass through their end control points, a continuous sequence of curves can be created by having them share endpoints. The curves will just physically connect, but not necessarily smoothly. This is called geometric continuity of order 0, often referred to as G0. Often it is desirable to have the curves appear to connect smoothly. This is referred to as geometric continuity of order 1, or G1. To have the curves connect smoothly, the tangent lines to the two curves at the shared point should have the same slope. This can be guaranteed by having the shared endpoint and the adjacent control points be collinear.

Geometric continuity addresses how the curve appears, but there is more rigorous form of continuity, known as analytical continuity, that addresses how the curve behaves as well as appears. This type of continuity is defined in terms of derivatives and is represented by C instead of G in discussions. In general, C0 is equal to G0. C1 means that the first derivatives of the two curves are equal at the shared point. G1 is equal to C1 when the tangent lines not only have the same slope, but the same magnitude as well. The first derivative is often interpreted as the velocity, so it is important for a curve to have C1 continuity when the curve is used to represent a path that a camera might take or else there will be a noticeable jump in the velocity as the camera passes through the shared point. If the second derivatives match, implying C2 continuity, the acceleration through the shared point matches as well.

For modelers, maintaining geometric continuity is usually sufficient, but often the more strict analytical continuity will be required when describing paths.

Some Uses for Curves

We examined Bézier curves as a step along our path to using them to generate curved surfaces, but they do have some uses of their own. Primary among these uses is to have them define paths for things like cameras and entities. Now your creatures will not have to move only along straight lines, but can move along curves as well.


Rendering Bézier Curves


join | contact us | advertise | write | my profile
news | features | companies | jobs | resumes | education | product guide | projects | store



Copyright © 2003 CMP Media LLC

privacy policy
| terms of service