What is a Bézier patch?
Bézier patch, similar to Bézier curve, is defined by a grid of control points. The grid can be of any size. The most common form of Bézier patch is bicubic Bézier surface patch, which uses a
Note: The bigger the grid, the more complex shapes we can make.
The Bézier patch is used in 3D modeling, such as Computer-aided design and computer graphics. It finds its applications in video games and animations.
How does it work?
The control points in the Bézier patch work as a magnet, pulling the surface of the patch towards them.
Each Bézier curve is made of
control points, and the Bézier patch is made up of control points ( Bézier curves). The shape of the surface is calculated based on the two parameters, named
and . You can think of
and as coordinates on the map, specifying where we are on the surface of the patch. Each control point in the grid has a weight assigned to it based on the
and . These weights are usually the values of the control points. The closer
or is to the position of a control point, the more weight that point has, and the more it influences the shape of the surface.
To represent a Bézier patch, the equation used to calculate the position of a point on the surface at parameters
Where,
is the coordinate in the horizontal direction of size . is the coordinate in the vertical direction of size . is a matrix describing the for a parametric cubic curve.blending functions The blending functions, also known as basis functions, are the Bernstein polynomials for Bézier patches
Note: Each row represents the coefficient of the control points.
is a matrix representing the control points of the surface patch.
The matrix for the control points of the surface patch is given below.
is the transpose of the matrix.
Once the weight for all the control points is calculated using the
Note:
The older points in the
matrix are then replaced by the newly calculated values of the points. All other matrices remain the same in the equation.
The
matrix contains all the updated values of the control points which is then used to draw the surface.
de Casteljau algorithm
The de Casteljau algorithm is a technique used for evaluating points on a Bézier curve or Bézier surface patch. It is based on the de Casteljau algorithm, which recursively subdivides the control points of the curve or surface to calculate points at specific values.
For Bézier curves, the de Casteljau algorithm interpolates control points linearly and is a one-dimensional process. However, for Bézier patches, the de Casteljau algorithm extends it to a two-dimensional process, where points on the surface are interpolated in two directions:
How it works
The working of the de Casteljau algorithm is as follows.
In order to draw a surface, define a Bézier curve using the four control points.
Choose a value of
. At the value of
, evaluate the four control points as , , , for all the four curves respectively (as shown in the first diagram below). Take these four values as the control points and define another 1D Bézier curve.
Choose the value of parameter
. It will give you the point
on the surface. Change the values of
and in order to draw every point on the surface.
Properties of Bézier patch
Bézier patch have several important properties, some of which are explained below.
Interpolation: Bézier patch can interpolate their control points to ensure that the surface passes through each of the control point.
Convex hull property: The Bézier patch lies within the
of its control points. It means that it stays close to the shape formed by its control points (no self-intersections or singularities).convex hull A minimum convex set enclosing a sample of points. Affine invariance: Bézier patches are invariant under
, such as translation, rotation, scaling, and skewing. It means that any transformations applied to the control points are reflected in the patch.affine transformations A linear mapping method that preserves points, straight lines, and planes. Local control: If we modify the position of one control point, it affects only a local portion of the Bézier patch. It allows each adjustments to specific parts of the surface without changing the entire shape.
Continue reading
Free Resources