The B-spline
The B-spline curve overcomes the main disadvantages of the B´ezier curve which are
(1)the degree of the B´ezier curve depends on the number of control points,
(2) it offers only global control, and
(3) individual segments are easy to connect with C1 continuity, but C2 is difficult to obtain.
The B-spline curve features local control and any desired degree of continuity.
To obtain Cn continuity, the individual spline segments have to be polynomials of degree n.
The B-spline curve is an approximating curve and is therefore defined by control points.
However, in addition to the control points, the user has to specify the values of certain quantities
called “knots.”
They are real numbers that offer additional control over the shape of the curve.
What are Fractals?
a fractal is "a rough or fragmented geometric shape that can be subdivided in parts, each of which
is (at least approximately) a reduced/size copy of the whole".
Fractals are very complex pictures generated by a computer from a single formula.
They are created using iterations.
This means one formula is repeated with slightly different values over and over again, taking into
account the results from the previous iteration.
Fractals are used in many areas such as −
Astronomy − For analyzing galaxies, rings of Saturn, etc.
Biology/Chemistry − For depicting bacteria cultures, Chemical reactions, human anatomy,
molecules, plants,
Others − For depicting clouds, coastline and borderlines, data compression, diffusion, economy,
fractal art, fractal music, landscapes, special effect, etc.
Generation of Fractals
Fractals can be generated by repeating the same shape over and over again as shown in the
following figure.
In figure (a) shows an equilateral triangle. In figure (b), we can see that the triangle is repeated to
create a star-like shape.
In figure (c), we can see that the star shape in figure (b) is repeated again and again to create a new
shape.
We can do unlimited number of iteration to create a desired shape.
In programming terms, recursion is used to create such shapes.
Geometric Fractals
Geometric fractals deal with shapes found in nature that have non-integer or fractal dimensions.
To geometrically construct a deterministic (nonrandom) self-similar fractal, we start with a given
geometric shape, called the initiator.
Subparts of the initiator are then replaced with a pattern, called the generator.
As an example, if we use the initiator and generator shown in the above figure, we can construct
good pattern by repeating it.
Each straight-line segment in the initiator is replaced with four equal-length line segments at each
step.
The scaling factor is 1/3, so the fractal dimension is D = ln 4/ln 3 ≈ 1.2619.
Also, the length of each line segment in the initiator increases by a factor of 4/3 at each step, so that
the length of the fractal curve tends to infinity as more detail is added to the curve as shown in the
following figure −
Classification of fractals
Fractals can also be classified according to their self-similarity. There are three types of self-similarity
found in fractals:
1) Exact self-similarity —
This is the strongest type of self-similarity; the fractal appears identical at different scales.
Fractals defined by iterated function systems often display exact self-similarity.
2) Quasi-self-similarity —
This is a loose form of self-similarity; the fractal appears approximately (but not exactly) identical
at different scales.
Quasi-self-similar fractals contain small copies of the entire fractal in distorted and degenerate
forms.
Fractals defined by recurrence relations are usually quasi-self-similar but not exactly self-similar.
3) Statistical self-similarity —
This is the weakest type of self-similarity; the fractal has numerical or statistical measures which
are preserved across scales.
Most reasonable definitions of "fractal" trivially imply some form of statistical self-similarity.
(Fractal dimension itself is a numerical measure which is preserved across scales.)
Random fractals are examples of fractals which are statistically self-similar, but neither exactly nor
quasi-self-similar.
Fractal Dimension
A fractal dimension is a ratio for figuring out the complexity of a system given its measurement.
how much an object fills a space
Fractal dimensions can be useful in machine learning (ML) as part of dimensionality reduction, in order
to change how machine learning systems deal with data.
The fractal dimension of a set is a number which tells how densely the set occupies the metric space in
which it lies
Self-similarity dimension
when broken into smaller and smaller pieces, the new pieces look exactly the same as the original
To yield self-similarity dimension to fractals, it is helpful to consider how segments,squares, and cubes
can be tiled using the same magnification factor for each tile, such that the new objects are similar to
the original.
D=log N/log S
S represents the scaling factor and is always a natural number.
N represents the number of smaller, self-similar figures (for a scaling factor S) needed to create the
larger figure.
The self-similarity dimension applies only to sets that are strictly self-similar.
So, we need to define a more generalized dimension that can be applied to sets that are only
"approximately" self-similar, including natural fractals like coastlines.
This generalized dimension is called box dimension.
Bezier Curves
Bezier curve is discovered by the French engineer Pierre Bézier.
These curves can be generated under the control of other points.
Approximate tangents by using control points are used to generate curve.
The Bezier curve can be represented mathematically as −
Where pi is the set of points and Bni(t) represents the Bernstein polynomials which are given by −
Where n is the polynomial degree, i is the index, and t is the variable.
The simplest Bézier curve is the straight line from the point P0 to P1. A quadratic Bezier curve is
determined by three control points.
A cubic Bezier curve is determined by four control points
Properties of Bezier Curves
Bezier curves have the following properties −
They generally follow the shape of the control polygon, which consists of the segments joining the
control points.
They always pass through the first and last control points.
They are contained in the convex hull of their defining control points.
The degree of the polynomial defining the curve segment is one less that the number of defining
polygon point.
Therefore, for 4 control points, the degree of the polynomial is 3, i.e. cubic polynomial.
A Bezier curve generally follows the shape of the defining polygon.
The direction of the tangent vector at the end points is same as that of the vector determined by first and
last segments.
The convex hull property for a Bezier curve ensures that the polynomial smoothly follows the control
points.
No straight line intersects a Bezier curve more times than it intersects its control polygon.
They are invariant under an affine transformation.
Bezier curves exhibit global control means moving a control point alters the shape of the whole curve.
A given Bezier curve can be subdivided at a point t=t0 into two Bezier segments which join together at
the point corresponding to the parameter value t=t0.