0% found this document useful (0 votes)
17 views16 pages

Curve Fractals 2ppt

The document discusses Bezier curves, a parametric curve used in computer graphics and CAD systems, highlighting their properties, construction methods, and applications. It also covers fractals, including self-similar and self-affine types, and their use in modeling natural shapes, along with specific curves like the Hilbert and Koch curves. The document concludes with methods for generating fractal lines and surfaces for realistic representations of irregular objects.

Uploaded by

kambleyamini15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views16 pages

Curve Fractals 2ppt

The document discusses Bezier curves, a parametric curve used in computer graphics and CAD systems, highlighting their properties, construction methods, and applications. It also covers fractals, including self-similar and self-affine types, and their use in modeling natural shapes, along with specific curves like the Hilbert and Koch curves. The document concludes with methods for generating fractal lines and surfaces for realistic representations of irregular objects.

Uploaded by

kambleyamini15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

It is another approach for construction of curve.

A Bezier curve
determined by defining polygon. Bezier curve have number of
properties that make them highly useful & covenant for curve &
surface design.

They are also easy to implement. Bezier curves are widely used in
various CAD systems. This is cubic Bezier curve because curves are
constructed as a sequence of cubic segments, rather than linear
ones & also avoids large number of calculations.

It is parametric curve frequently used in computer graphics &


related fields. Bezier curve are used to model smooth curves that
can scaled indefinitely.

 In cubic Bezier curve 4 control points are used to specify


complete curve unlike the B-spline curve, we don’t add intermediate
points & smoothly extend the Bezier curve, but we pick 4 more
points & constructs a 2nd curve which can be attached to 1 st.

The 2nd curve can be attached to the 1 st curve smoothly by setting


appropriate control points. Fig-5-8
1
 The fig a &b shows Bezier curve & its 4 control points. As shown in
fig. Bezier curve begins at 1st control point & ends at 4th control
points.

 This means that if we want to connect 2Bezier curve, we have to


make 1st control point of 2nd Bezier curve matches with the last
control point of 1st curve.

 We can also observe that at the start of the curve, curve is tangent
to line connecting 1st & 2nd control points. Similarly at the end of the
curve, curve is tangent to line connecting 3rd & 4th control point.

 Means to join 2 Bezier curves smoothly we have to place the 3rd &
4th control points of 1st curve on the same line specified by 1st & 2nd
control points of 2nd curve.

 Equation of Bezier curve are as


 X=x4u3 +3x3u2 (1-u)+3x2u(1-u)2 +x1(1-u)3
 Y=y4u3 +3y3u2 (1-u)+3y2u(1-u)2 +y1(1-u)3 &
 Z=z4u3 +3z3u2 (1-u)+3z2u(1-u)2 +z1(1-u)3
2
 4 blending functions for cubic Bezier curve are
BEZ0, 3(u)=(1-u)3 BEZ2 3(u)=3u 2 (1-u)
BEZ1,3(u)=3u(1-u)2 BEZ3,3(u)=u 3

 Another approach is use Midpoint approach. In this method Bezier


curve can be constructed simply by taking midpoints. In midpoint
approach midpoints of the lines connecting 4 control points (A, B, C,
D) are determined (AB, BC,CD). Fig-5-9-2

 These midpoints are connected by line segments & their midpoints


ABC & BCD are determined. Finally these midpoints are connected by
line segments & its midpoint ABCD is determined.

 The point ABCD on Bezier curve divides original curve into 2


sections. This makes the points A,AB,ABC, & ABCD are control points
for 1st section. Points ABCD,BCD,CD & D are control points for 2 nd
section.

 By considering 2sections separately we can get 2 more sections. For


each separate section i.e. original Bezier curve gets divided into 4
different curves. 3
 This process can be represented to split curve into smaller sections until
we have sections so short , so that they can be replaced by straight line
or even until sections are not bigger than individual pixels.

 ALGORITHM
 1.Get 4control points say
A(xA, yA) B(xB, yB) C(xC, yC) D(xD,
yD)
 2.Divide curve represented by points A, B,C, D in two sections
xAB= (xA+xB)/2 xABC=(xAB+xBC)/2

yAB= (yA+yB)/2 yABC=(yAB+yBC)/2


xBC= (xB+xC)/2 xBCD=(xBC+xCD)/2
yBC= (yB+yC)/2 yBCD=(yBC+yCD)/2
xCD= (xC+xD)/2 xABCD=(xABC+xBCD)/2
yCD= (yC+yD)/2 yABCD=(yABC+yBCD)/2
 3.Repeat step2 for section A,AB,ABC, ABCD, BCD ,CD,D& ABCD
 4.Repeat step 3 until we have sections so short that they can be replaced
by straight line
 5.Replace small section by straight line
 6.STOP 4
Bezier curve always passes through 1 & last control points
i.e. curve has same end points as guiding the polygon

The degree of polynomial defining curve segment is one less


than the number of defining polygon points. For 4control
points, degree of polynomial is 3 i.e. cubic polynomial.

The curve generating follows the shape of defining polygon.

The direction of tangent vector at the end points is same as


that of the vector determined by 1st & last segments.

The curve lies entirely within the convex hull formed by four
control points.
The convex hull property for Bezier curve ensures that
polynomial smoothly follows control points.

The curve exhibits variation diminishing property. This means


that curve doesn’t oscillates about any straight line more
often than defining polygon

PROPERTIES OF BEZIER 5
The objects which are having smooth surface & regular shapes such
as lines, polygons, circle etc are generally described by using
equations. But natural objects such as mountain, trees, ocean waves,
cloud etc are having irregular shapes. So it is difficult to draw these
shapes by using normal equations.

So when we try to draw above natural shapes (such as trees, ocean
waves, so on… ) such rough, jagged(having a sharply uneven surface
or outline) surfaces are called FRACTALS.

Fractals is rough OR fragmented geometric shape that can be split


into parts, each of which is (AT least approximately) a reduced-size
copy of the whole(This is called as SELF-SIMILARITY)

 Classification of fractals:-
1.SELF-SIMILAR
2.SELF-AFFINE
3.INVARIENT
Self-similar fractals:-
 These are the fractals have parts those are scaled-down versions of
the entire object. In these fractals object subparts are constructed by
applying a scaling parameter ”S” to the overall initial shape.
CURVE FRACTALS 6
 It is a choice of user to use the same scaling factor S for all
subparts, OR use different scaling factors for different scaled-down
parts of object.

 Another sub class of self similar fractals is statistically self-similar


fractals, in which user can also apply random variations to the scaled
down subparts. These fractals are commonly used to model trees, &
other plants.

 Self-Affine Fractals:-
 These fractals have parts those are formed with different scaling
parameters Sx , Sy, Sz in different co-ordinate directions.

 In these fractals, we can also apply random variations to obtain


statistically self-affine fractals. These fractals are commonly used to
model water, clouds etc…

 Invariant Fractals:-
 In these fractals, non-linear transformation is used. It includes self
squaring fractals which are formed with squaring functions in
complex space, & inverse fractals, form with inversion procedures. 7
The Hilbert's curve can be constructed by following successive
approximation. If square is divided into 4quadrant we can draw the 1 st
approximation to Hilbert’s curve by connecting centre points of each
quadrant -Fig-5-14

The 2nd approximation to the Hilbert’s curve can be drawn by further


subdividing each of quadrant & connecting their centers before moving to
next major quadrant.-Fig-5-14

The 3rd approximation subdivide quadrants again. We can draw 3 rd


approximation to Hilbert’s curve by connecting the centers of finest level
of quadrants before stepping to next level of quadrant. Fig-5-14-2

From above 3steps & fig. we can easily note some points about Hilbert’s
curve.1.If we initially extend approximation to Hilbert’s curve, curve fills
the smaller quadrants but never crosses itself

2.The curve is arbitrarily close to every point in square. The curve


passes through a point on a grid, which becomes twice as fine with each
subdivision

HILBERT'S CURVE 8
 4.There is no limit to subdivisions and therefore length of the
curve is infinite. So with each subdivision length of the curve
increases by factor of 4.

 At each subdivision the scale changes by 2 but length changes by


4. Therefore for Hilbert’s curve topological dimensions is one but
fractal dimension is two. The curve passes through a point on a
grid, which becomes twice as fine as with each subdivision.

 Topological Dimensions:-
 Consider object composed of clay. If object deformed into line OR
line segment. So we assign it’s dimension Dt =1, If object deforms
into plane OR half plane OR disk we assign it’s dimension Dt=2, If
object deforms into all space OR half space OR sphere, we assign
its dimension Dt=3 So the dimension Dt is referred to as the
topological dimension.

 Fractal Dimension:-
 It is 2nd measure of an object dimension. Imagine that a line
segment of length L is divided into N identical pieces.
9
 The length of each line segment l can be given as, l=L/N------1. The
ratio of length of original line segment & length of each part of the
line segment is referred to as scaling factor & it is given as,
s=L/l-------2 fig 5-12-2-a

 From above two equations we can write N=s i.e. N=s 1 In other word
we can say that, if we scale a line segment by factor 1/s then we
have to add N pieces together to get the original line segment.

 If we scale square object by factor 1/s we will get a small square, In


case of s=2, we require 4pieces of square to get original square .So
in general we can write N=s2 Similarly for cube it is N=s3 fig 5-12-
2-b & c

 So We can specify dimension of object by variable D. Here exponent


of s is measure of object dimension. So we can write
N=sD
solving for D we get,
D=log N/log s
so this D is called Fractal Dimension 10
The Koch curve can be drawn by dividing line into 4eual
segments with scaling factor 1/3 & middle two segments are so
adjusted that they form adjacent sides of equilateral triangle
(Refer Fig5-15-a) This is 1st approximation of Koch curve.

To apply 2nd approximation to Koch curve we have to repeat


above process for each of 4segments. The resultant curve is
(Refer Fig5-15-b). The resultant curve has more wiggles(move
or cause to move up and down or from side to side with small
rapid movements.) & it’s length is 16/9 times the original
length So from fig. we can note some points as..

1. Each repetetition increases length of curve by factor 4/3.


Length of curve is infinite

2.Like Hilbert’s curve, it doesn’t fill an area.

3.It doesn’t deviate from its original shape.

KOCH CURVE 11
 4.If we reduce the scale of curve by 3, we find curve that
looks just like the original one; but we must assemble 4
such curves to make original,
So we have 4=3D

 Solving for D we get,


D=log3 4
D=log 4/ log 3
D=1.2618
 For Koch curve topological dimension is 1 But fractal
dimension is 1.2618. So we can say that point sets, curves
& surfaces which give fractal dimension greater than
topological dimension are called fractals.

 The Hilbert’s curve & Koch curve are Fractals, Because their
fractal dimensions (Respectively,2 & 1.2618) are greater
than their topological dimensions which is 1
12
Natural objects such as mountain, trees, waves of ocean & clouds
etc have irregular shapes & it is very difficult to draw these shapes by
using normal equation.

To model these objects we use fractals. Fractal lines are used to
draw self similar curves. The fractal lines can be generated by
performing following steps:-
1.If the straight line segment is specified by points (x,y,z) &
(x2,y2,z2) fing midpoint of line by using following expression:-
(x1+x2/2 , y1+y2/2 , z1+z2/2 ) Refer fig 5-16-2

2.Add offset to midpoint such that resultant midpoint should not lie
on line itself. This can be achieved by adding offset term to each co-
ordinate as
(x1+x2/2+dx , y1+y2/2 +dy , z1+z2/2 +dz) Refer fig
5-17

In order to get random effect calculate offset as


dx=L* W* GAUSS
dy=L* W* GAUSS
dz=L* W* GAUSS

FRACTAL LINES 13
 Where
L-Length of segment
W-Waiting function governing the curve
roughness (i. e. Fractal dimension)
GAUSS-Gaussian variable which returns
random values between -1 & 1 with
ZERO mean i.e. returned values consist of
equal amount of positive & negative values.

 3.The shifted midpoint divides original line into 2parts.


Repeat same process for each part separately.

 4.Repeat the process 1,2,3 until segments becomes small


enough.
By following the above procedure we get fractal lines
(Refer fig-5-18). The above implementation can easily be
achieved using recursive procedure.
14
The concept of fractal lines can be extended to generate
fractal surfaces . There are many ways to accomplish this.
Fractal surfaces are used to draw 3D objects like say
mountain.

We use the method based on triangles. We know that


triangles has 3 vertex points. We can generate a fractal
surface for the area between them.

 We can apply fractal line algorithm to each edge of


triangle to divide it into 2 line segment .

By connecting half way points of each line segments we


can divide original triangle into 4smaller triangles.

Similarly we can recursively apply procedure to each of


small triangle to subdivide the surface even further, we
can continue the subdivision until the triangles are small
enough to get fractal surface as shown in 3rd fig.

FRACTAL SURFACES 15
16

You might also like