资 源 简 介
Beziér Curves & DHTML
You’ve no doubt already heard of Beziér curves and seen them being used in graphics packages and computer games. You may have even thought of using them to perform animations and transitions in DHTML, but maybe you were daunted by the complex mathematics involved.
While the underlying principles are reasonably advanced, it is not necessary for you to understand the Beziér Functions in order to use them.
Beziér functions can be used to generate a wide range of shapes, including 2D & 3D lines and 3D patches for modeling. This tutorial shows you how to use a cubic Beziér curve in 2-dimensions and uses the Bernstein Basis Function to calculate the points on the curve.
The Maths
The Bernstein Basis Function is as follows:
1 = t + (1 - t)
Obvious right? Try it out, substitute any value for t and you will find this equation holds true.
Now, we use this function as a parametric method for generating the