Unit-V discusses curves and fractals. Curves are continuous maps from a one-dimensional space to an n-dimensional space. Curves can be represented explicitly, implicitly, or parametrically. Splines are commonly used curves that are constructed by specifying control points and interpolating between them. Bezier curves are another type of curve defined by control points, where the first and last points are the endpoints and the other points control the tangents. Both splines and Bezier curves can be subdivided recursively to render smooth curves.
with today's advanced technology like photoshop, paint etc. we need to understand some basic concepts like how they are cropping the image , tilt the image etc.
In our presentation you will find basic introduction of 2D transformation.
A Bézier curve is a parametric curve frequently used in computer graphics and related fields. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case.
with today's advanced technology like photoshop, paint etc. we need to understand some basic concepts like how they are cropping the image , tilt the image etc.
In our presentation you will find basic introduction of 2D transformation.
A Bézier curve is a parametric curve frequently used in computer graphics and related fields. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case.
Evaluators provide a way to specify points on a curve or surface (or part of one) using only the control points. The curve or surface can then be rendered at any precision. In addition, normal vectors can be calculated for surfaces automatically. You can use the points generated by an evaluator in many ways - to draw dots where the surface would be, to draw a wireframe version of the surface, or to draw a fully lighted, shaded, and even textured version.
Bezier Curves, properties of Bezier Curves, Derivation for Quadratic Bezier Curve, Blending function specification for Bezier curve:, B-Spline Curves, properties of B-spline Curve?
Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm Aparna Joshi
This presentation contains -
- Characteristics of line drawing algorithm
- DDA Line Drawing Algorithm
- Bresenham's Line Drawing Algorithm
- Circle Drawing Algorithm
- Eight way symmetry of a circle
- Breseham's Circle Drawing Algorithm
- Midpoint Circle Algorithm
a spline is a flexible strip used to produce a smooth curve through a designated set of points.
Polynomial sections are fitted so that the curve passes through each control point, Resulting curve is said to interpolate the set of control points.
Evaluators provide a way to specify points on a curve or surface (or part of one) using only the control points. The curve or surface can then be rendered at any precision. In addition, normal vectors can be calculated for surfaces automatically. You can use the points generated by an evaluator in many ways - to draw dots where the surface would be, to draw a wireframe version of the surface, or to draw a fully lighted, shaded, and even textured version.
Bezier Curves, properties of Bezier Curves, Derivation for Quadratic Bezier Curve, Blending function specification for Bezier curve:, B-Spline Curves, properties of B-spline Curve?
Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm Aparna Joshi
This presentation contains -
- Characteristics of line drawing algorithm
- DDA Line Drawing Algorithm
- Bresenham's Line Drawing Algorithm
- Circle Drawing Algorithm
- Eight way symmetry of a circle
- Breseham's Circle Drawing Algorithm
- Midpoint Circle Algorithm
a spline is a flexible strip used to produce a smooth curve through a designated set of points.
Polynomial sections are fitted so that the curve passes through each control point, Resulting curve is said to interpolate the set of control points.
Geo is very important information about geological life and environment so this PPT presentation is very crucial and give me information about geological survey
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Subhajit Sahu
Abstract — Levelwise PageRank is an alternative method of PageRank computation which decomposes the input graph into a directed acyclic block-graph of strongly connected components, and processes them in topological order, one level at a time. This enables calculation for ranks in a distributed fashion without per-iteration communication, unlike the standard method where all vertices are processed in each iteration. It however comes with a precondition of the absence of dead ends in the input graph. Here, the native non-distributed performance of Levelwise PageRank was compared against Monolithic PageRank on a CPU as well as a GPU. To ensure a fair comparison, Monolithic PageRank was also performed on a graph where vertices were split by components. Results indicate that Levelwise PageRank is about as fast as Monolithic PageRank on the CPU, but quite a bit slower on the GPU. Slowdown on the GPU is likely caused by a large submission of small workloads, and expected to be non-issue when the computation is performed on massive graphs.
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...John Andrews
SlideShare Description for "Chatty Kathy - UNC Bootcamp Final Project Presentation"
Title: Chatty Kathy: Enhancing Physical Activity Among Older Adults
Description:
Discover how Chatty Kathy, an innovative project developed at the UNC Bootcamp, aims to tackle the challenge of low physical activity among older adults. Our AI-driven solution uses peer interaction to boost and sustain exercise levels, significantly improving health outcomes. This presentation covers our problem statement, the rationale behind Chatty Kathy, synthetic data and persona creation, model performance metrics, a visual demonstration of the project, and potential future developments. Join us for an insightful Q&A session to explore the potential of this groundbreaking project.
Project Team: Jay Requarth, Jana Avery, John Andrews, Dr. Dick Davis II, Nee Buntoum, Nam Yeongjin & Mat Nicholas
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Data and AI
Discussion on Vector Databases, Unstructured Data and AI
https://www.meetup.com/unstructured-data-meetup-new-york/
This meetup is for people working in unstructured data. Speakers will come present about related topics such as vector databases, LLMs, and managing data at scale. The intended audience of this group includes roles like machine learning engineers, data scientists, data engineers, software engineers, and PMs.This meetup was formerly Milvus Meetup, and is sponsored by Zilliz maintainers of Milvus.
2. 6.1.1 Introduction to curve
•The basic aim of computer graphics is to
display realistic object.
•Mathematically, a curve is a continuous map
from a one-dimensional space to an n-
dimensional space.
•In computer graphics often we need to
populate our virtual world objects which are
not always flat , which will be drawn with
lines.
•So,We have to use to use curves many times
to draw an object.
3. Modeling with Curves
• Specify control points
• And then interpolate control points to form a
smooth curve.
4. Representation of curve
1.Explicit representation
a.2D , y=f(x) Gives a value of one variable
b.In 2D plane ie. X,Y plane we may write it as y=f(x)
c.In 3D plane i.e. X,Y,Z plane we may write it as
z=f(x,y)
2.Implicit Representation
a.f(x,y)=0 or f(x,y,z)=0
b.Less coordinate system dependent
3.Parametric Representation
a.Curve express value of special variable of points in
the form of independant variable u
b.x=f(u) , y=f(u), z=f(u)
5. Interpolation
• Interpolation is the process of estimating unknown
values that fall between known values.
• Interpolation is a method of constructing new data
points within range of discrete set of known data
points.
• The number of data points obtained by sampling or
experimentation represents values of function for
limited number of values of independent variable.
• The main task of Interpolation is to find suitable
mathematical expression for known curve. This
technique is used when we have to draw curve by
determining intermediate points between known
sample points.
6. 6.1.3 Interpolation and
Approximation
• Interpolation
– Goes through all specified points
– Sounds more logical but unstable
– commonly used to digitize drawings or to specify
animation paths
• Approximation
– Does not go through all points
– Convenient
– used as design tools to structure object surfaces
7. 6.1.2 Spline
• Splines is types of smooth curve in 2D
• Used in graphics applications to design curve and
surface shapes specify animation shapes, to digitize
drawings for computer storage
• Splines are interactively constructed by specifying a
set of discrete screen points called as control points
that give the general shape of the curve
• Then the system fits the set of points with a
polynomial curve
• These control points are then fitted with piecewise
continuous parametric polynomial functions in one
of two ways.
8. 6.1.4 Spline Specifications :
Three methods for specifying a particular spline
representation
• State the set of boundary conditions that are
imposed on the spline
• State the matrix that characterizes the spline
• State the set of blending functions (or basis
functions) that determine how specific geometric
constraints on the curve are combined to calculate
positions along the curve path
9. 6.2.1 Blending function
• Popular curves used in graphics are specified
by parametric equations.
• like y = fy(u) and x = fx(u )
• They allows curves that can double back and
cross themselves, which are impossible to
specify in a single equation in the y = f(x)
case
• Parametric equations are also easier to
evaluate.
10. • The general idea, as with all curve
algorithms, is to use the control points to
generate parametric equations.
• To draw the curve, all that is then needed is
to step through u at some small amount,
drawing straight lines between the
calculated points.
• The smaller the step size the more smooth
the curve will appear
11. • Blending function determines the shapes
of a curve for a particular point. This
curve's function can be constructed as a sum
of terms, one for each control point.
• To achieve the goal of LeGrange
interpolation, getting a curve that passes
through all the specified control points, the
blending functions must be defined so that
the curve will go through each control point
in the proper order
12. • This can be done by creating blending functions
where the first control point is passed through (has
total control) at u = -1, the second control point is
passed through at u = 0, the third at u = 1, and so on
• A mathematical expression that does so is:
u (u - 1) (u - 2) . . . [u - (n - 2)]
• At u = -1 this expression is: -1 (-2) (-3) . . . (1 - n)
• So dividing by this constant gives us 1 at u=-1 we get
B1(u)= u.(u-1).(u-2). [u-(n-2)] / (-1) (-2)
……….(1-n)
13. • The i th blending function which is 1 at u=i-2
(u + 1) (u) (u - 1) ... [u - (i - 3)] [u - (i - 1)]
... [u - (i - 2)]
B[i](u) = ------------------------------------------------
---------------------
(i - 1) (i - 2) (i - 3) ... (1) (-1) ... (i - n)
• To draw a curve using this, it is necessary to
decide how many control points we will use
for the basis of the curve, and then calculate
the blending functions B[1](u) to B[n](u),
where n is the number of control points.
14. • The final functions for x, y, and z are then:
x = x[1] B[1](u) + x[2] B[2](u) + x[3]
B[3](u) + . . . + x[n] B[n](u)
y = y[1] B[1](u) + y[2] B[2](u) + y[3]
B[3](u) + . . . + y[n] B[n](u)
z= z[1] B[1](u) + z[2] B[2](u) + z[3]
B[3](u) + . . . + z[n] B[n](u)
Where x[i] is the x coordinate of the ith
control point, and y[i] is the y coordinate
of the ith control point & so z.
• Let us consider there are four sample points.
Then there will be four blending functions as
16. Cubic Spline Interpolation
Given a set of control points, cubic interpolation
splines are obtained by fitting the input points
t.%.ith a piecewise cubic polynomial curve that
passes through every control point. Suppose we
have n + 1 control points specified with
coordinates
p=(xk,yk,zk) k=0,1,2…...n
A cubic interpolation fit of these points is
illustrated figure 10.26 from Baker
X(U) = axu3 + bxu2 + cxu + dx
y(u)=ayu3+byu2+cyu+dy
Z ( U ) = axu3 + bxu2 +cxu+d,...............................2.1
17. Hemite spline
Is an interpolating piecewise cubic polynomial
with a specified tangent at each control point.
Unlike the natural cubic splines, Hermite splints
can be adjusted locally because each curve
section is only dependent on its endpoint
constraints.
p(0)=pk
p(1)=pk+1
p’(0)=Dpk
p’(1)= Dpk+1
Dpk nd Dpk+1,spcitying the values for the
18. Hermite Spline
• A spline is a parametric curve defined by control points
– The term spline dates from engineering drawing, where a
spline was a piece of flexible wood used to draw smooth
curves
– The control points are adjusted by the user to control the
shape of the curve
• A Hermite spline is a curve for which the user provides:
– The endpoints of the curve
– The parametric derivatives of the curve at the endpoints
(tangents with length)
• The parametric derivatives are dx/dt, dy/dt, dz/dt
– That is enough to define a cubic Hermite spline, more
derivatives are required for higher order curves
19. • Say the user provides
• A cubic spline has degree 3, and is of the form:
– For some constants a, b, c and d derived from the
control points, but how?
• We have constraints:
– The curve must pass through x0 when t=0
– The derivative must be x’0 when t=0
– The curve must pass through x1 when t=1
– The derivative must be x’1 when t=1
20. • Solving for the unknowns gives:
• Rearranging gives:
•
• or
0
0
0
1
0
1
0
1
0
1
2
3
3
2
2
x
d
x
c
x
x
x
x
b
x
x
x
x
a
)
2
(
)
(
x
)
1
3
2
(
)
3
2
(
2
3
0
2
3
1
2
3
0
2
3
1
t
t
t
x
t
t
t
t
x
t
t
x
x
1
0
1
2
1
0
0
1
1
1
0
3
2
0
0
3
2
2
3
0
1
0
1
t
t
t
x
x
x
x
x
21. Basis Functions
• A point on a Hermite curve is obtained by multiplying each control point by some function
and summing
• The functions are called basis functions
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
x1
x0
x'1
x'0
22. Splines in 2D and 3D
• We have defined only 1D splines:
x=f(t:x0,x1,x’0,x’1)
• For higher dimensions, define the control
points in higher dimensions (that is, as
vectors)
11/19/02 (c) 2002, University of Wisconsin, CS 559
1
0
1
2
1
0
0
1
1
1
0
3
2
0
0
3
2
2
3
0
1
0
1
0
1
0
1
0
1
0
1
t
t
t
z
z
z
z
y
y
y
y
x
x
x
x
z
y
x
24. Bezier Curve
• An alternative to splines
• M. Bezier was a French mathematician who worked for the Renault
motor car company.
• He invented his curves to allow his firm’s computers to describe the
shape of car bodies
• For Bezier curves, two control points define endpoints, and two control
the tangents at the endpoints in a geometric way
25. Bezier curves
• Typically, cubic polynomials similar to
Hermite interpolation
– Special way of specifying end tangents
• Requires special set of coefficients
• Need four points
– Two at the ends of a segment
– Two control tangent vectors
26. ?
and
provide
to
How 4
1 R
R
1
P
4
P
1
R 4
R
mation
Approxi
and
!
!
!
points
control
additional
two
provide
,
and
providing
of
Instead
3
2
4
1
P
P
R
R
1
P
4
P
2
P 3
P
Bezier Approximation
28. Bezier Curve Properties
• The first and last control points are interpolated
• The tangent to the curve at the first control point is
along the line joining the first and second control
points
• The tangent at the last control point is along the line
joining the second last and last control points
• The curve lies entirely within the convex hull of its
control points
– The Bernstein polynomials (the basis functions) sum to 1
and are everywhere positive
• They can be rendered in many ways
– E.g.: Convert to line segments with a subdivision algorithm
11/19/02 (c) 2002, University of Wisconsin, CS 559
29. Rendering Bezier Curves (1)
• Evaluate the curve at a fixed set of
parameter values and join the points with
straight lines
• Advantage: Very simple
• Disadvantages:
– Expensive to evaluate the curve at many
points
– No easy way of knowing how fine to sample
points, and maybe sampling rate must be
different along curve
– No easy way to adapt. In particular, it is hard
to measure the deviation of a line segment
from the exact curve
11/19/02 (c) 2002, University of Wisconsin, CS 559
30. Rendering Bezier Curves (2)
• Recall that a Bezier curve lies entirely within the convex hull
of its control vertices
• If the control vertices are nearly collinear, then the convex
hull is a good approximation to the curve
• Also, a cubic Bezier curve can be broken into two shorter
cubic Bezier curves that exactly cover the original curve
• This suggests a rendering algorithm:
– Keep breaking the curve into sub-curves
– Stop when the control points of each sub-curve are nearly
collinear
– Draw the control polygon - the polygon formed by the control
points
11/19/02 (c) 2002, University of Wisconsin, CS 559
31. Sub-Dividing Bezier Curves
• Step 1: Find the midpoints of the lines joining the
original control vertices. Call them M01, M12, M23
• Step 2: Find the midpoints of the lines joining
M01, M12 and M12, M23. Call them M012, M123
• Step 3: Find the midpoint of the line joining M012,
M123. Call it M0123
• The curve with control points P0, M01, M012 and
M0123 exactly follows the original curve from the
point with t=0 to the point with t=0.5
• The curve with control points M0123 , M123 , M23
and P3 exactly follows the original curve from the
point with t=0.5 to the point with t=1
11/19/02 (c) 2002, University of Wisconsin, CS 559
35. What are Fractals?
• A fractal is generally "a rough or fragmented geometric shape
that can be subdivided into parts, each of which is (at least
approximately) a reduced-size copy of the whole," a property
called self-similarity
• Mathematical expressions
• Approach infinity in organized way
• Utilizes recursion on computers
• Popularized by Benoit Mandelbrot (Yale university).
• Level of detail remains the same as we zoom in Example:
surface roughness or profile same as we zoom in
36. Fractal Geometric Methods
• A mountain outlined against the sky
continues to have the same jagged shape as
we view it from a loser and closer position
(Fig. 10-5). As we near the mountain, the
smaller detail in the individual ledges and
boulders becomes pparent. Moving even
closer, we see the outlines of rocks, then
stones, and then grains of sand. At each
step, he outline eveals more twists and
turns. If we took the rains of sand and put
them under a icroscope, we would again see
the same detail repeated down through the
molecular level. Similar shapes describe
coastlines and the edges ofplants and
clouds. [Baker]
37. Fractals: Self-similarity
• A fractal object has two basic characteristics:
• Types:
• Exactly self-similar :infinite detail at every point
• Statistically self-similar : self-similarity between the
object parts and the overall features of the
object
38. Examples of Fractals
• Clouds
• Grass
• Fire
• Modeling mountains (terrain)
• Coastline
• Branches of a tree
• Surface of a sponge
• Cracks in the pavement
• Designing antennae (www.fractenna.com)
39. Fractal-Generation Procedures
• A fractal object is generated by repeatedly applying
specified ransformation function to points within a region
of space.
• If Po = (xO, yo, o) s a elected initial point, each iteration of a
transformation unction F generates successive levels of
detail with the calculations.
• P1=F(Po) P2=F(P1) P3=F(P2)
• In general, the transformation function can be applied to a
specified point , or we could apply the transformation
function o n initial sel of primitives, such s straight lines,
curves, color areas, surfaces, and solid objects
•
40. • The transformation function may be defined in terms
of geometric transformations (scaling, translation,
rotation), or it can be set up with nonlinear coordinate
trans- formations and decision parameters.
• A procedural representation approaches a "true"
fractal as he number of transformations is increased to
reduce more and more detail.
• The amount of detail included in the final graphical
display of an object depends n the number of
iterations performed and the resolution of the display
system
41. Dimension
• Topological Dimension:-
• Consider an object is composed of elastic or clay. If the object can
be deformed into a line or line segment we assign its dimension Dt=1.
• If object deforms into a plane or half plane we assign its
dimension Dt=2.
• If object deforms into all space or half space or sphere we assign
its dimension Dt=3. The dimension Dt is referred to as the Topological
Dimension.
• Fractal Dimension:-
• it is the second measure of an object dimension. Imagine that a
line segment of length L is divided into N identical pieces. The length of
each line segment l can be given as l = L / N
42. Classification of Fractals
• Self-similar fractals have parts that are scaled-down versions of
the entire object. Starting with an initial shape, we construct the
object subparts by apply a scaling parameter s to the overall
shape. The parts then have the same statistical properties.
Statistically self-similar fractals are commonly used to model
trees, shrubs, and other plants.
• Self-affine fractals have parts that are formed with different
scaling parameters, sx ,sy , sz in different coordinate directions.
And we can also include random variations to obtain statistically
self-affine fractals. Terrain, water, and clouds are typically
modeled with statistically self-affine fractal construction
methods.
• Invariant fractal sets are formed with nonlinear
transformations. This class of fractals includes self-squaring
fractals, such as the Mandelbrot set, which are formed with
squaring functions in complex space; and self-inverse fractals,
formed with inversion procedures
50. Koch Curve
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.
51. As an example, if we use the initiator
and generator shown in Fig. 10-68,
we can construct the snowflake
pattern, or Koch curve, shown in ig. 10-
69.
Each straight-line segment in the
initiator is replaced with four equal-
length line segments at each step.
52. The scaling factor is 1/3, so the
fractal dimension is D = In 4/In 3 =
1.2619.
Also, the length of each line
segment in the initiator increases 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 (Fig. 10-70)
53. Koch Curves
• Discovered in 1904 by Helge von Koch
• Start with straight line of length 1
• Recursively : Divide line into 3 equal parts
– Replace middle section with triangular bump with sides of length 1/3
– New length = 4/3
55. Koch Snowflakes
• Can form Koch snowflake by joining three Koch curves
• Perimeter of snowflake grows as:
where Pi is the perimeter of the ith snowflake iteration
• However, area grows slowly and S = 8/5!!
• Self-similar:
– zoom in on any portion
– If n is large enough, shape still same
– On computer, smallest line segment > pixel spacing
i
i
P
3
4
3
56. Koch Snowflakes
Pseudocode, to draw Kn:
If (n equals 0) draw straight line
Else{
Draw Kn-1
Turn left 60°
Draw Kn-1
Turn right 120°
Draw Kn-1
Turn left 60°
}
57. Iterated Function Systems (IFS)
• Recursively call a function
• Does result converge to an image? What
image?
• IFS’s converge to an image
• Examples:
– The Fern
– The Mandelbrot set
59. Mandelbrot Set
• Based on iteration theory
• Function of interest:
• Sequence of values (or orbit):
c
s
z
f
2
)
(
)
(
c
c
c
c
s
d
c
c
c
s
d
c
c
s
d
c
s
d
2
2
2
2
4
2
2
2
3
2
2
2
2
1
)
)
)
)
((((
)
)
)
(((
)
)
((
)
(
60. Mandelbrot Set
• Orbit depends on s and c
• Basic question,:
– For given s and c,
• does function stay finite? (within Mandelbrot set)
• explode to infinity? (outside Mandelbrot set)
• Definition: if |s| < 1, orbit is finite else inifinite
• Examples orbits:
– s = 0, c = -1, orbit = 0,-1,0,-1,0,-1,0,-1,…..finite
– s = 0, c = 1, orbit = 0,1,2,5,26,677…… explodes
61. Mandelbrot Set
• Mandelbrot set: use complex numbers for c
and s
• Always set s = 0
• Choose c as a complex number
• For example:
• s = 0, c = 0.2 + 0.5i
• Hence, orbit:
• 0, c, c2, c2+ c, (c2+ c)2 + c, ………
• Definition: Mandelbrot set includes all finite
orbit c
62. Mandelbrot Set
• Some complex number math:
• For example:
• Modulus of a complex number, z = ai + b:
• Squaring a complex number:
1
*
i
i
6
3
*
2
i
i
2
2
b
a
z
Ref: Hill Appendix 2.3
i
xy
y
x
yi
x )
2
(
)
( 2
2
64. Mandelbrot Set
• Calculate first 3 terms
– with s=2, c=-1, terms are
– with s = 0, c = -2+i
575
1
24
24
1
5
5
1
2
2
2
2
i
i
i
i
i
i
i
i
5
10
)
2
(
3
1
3
1
)
2
(
)
2
(
2
)
2
(
0
2
2
65. Mandelbrot Set
• Fixed points: Some complex numbers converge
to certain values after x iterations.
• Example:
– s = 0, c = -0.2 + 0.5i converges to –0.249227 +
0.333677i after 80 iterations
– Experiment: square –0.249227 + 0.333677i and add
-0.2 + 0.5i
• Mandelbrot set depends on the fact the
convergence of certain complex numbers
66. Mandelbrot Set
• Routine to draw Mandelbrot set:
• Cannot iterate forever: our program will hang!
• Instead iterate 100 times
• Math theorem:
– if number hasn’t exceeded 2 after 100 iterations, never
will!
• Routine returns:
– Number of times iterated before modulus exceeds 2, or
– 100, if modulus doesn’t exceed 2 after 100 iterations
– See dwell( ) function in Hill (figure 9.49, pg. 510)
67. Mandelbrot Set
• Map real part to x-axis
• Map imaginary part to y-axis
• Set world window to range of complex numbers
to investigate. E.g:
– X in range [-2.25: 0.75]
– Y in range [-1.5: 1.5]
• Choose your viewport. E.g:
– Viewport = [V.L, V.R, V.B, V.T]= [60,380,80,240]
• Do window-to-viewport mapping
69. Mandelbrot Set
• So, for each pixel:
– Compute corresponding point in world
– Call your dwell( ) function
– Assign color <Red,Green,Blue> based on dwell( ) return
value
• Choice of color determines how pretty
• Color assignment:
– Basic: In set (i.e. dwell( ) = 100), color = black, else color =
white
– Discrete: Ranges of return values map to same color
• E.g 0 – 20 iterations = color 1
• 20 – 40 iterations = color 2, etc.
– Continuous: Use a function
70. Hilbert’s Curve:-
• This is called Peano curve or space filling curve.
• This curve never crosses itself.
• The length of the curve is infinite. With each subdivision, the
length increases by a factor of 4. since we imagine no limit
to the subdivisions, there is also no limit to the length. So we
have constructed a curve which is topologically equivalent to
a line Dt=1
• We can find the fractal dimension of the curve. At each sub-
division the scale changes by 2 but the length changes by 4.
hence the dimension given by 4= 2D
• Thus Hilbert’s curve has topological dimension 1 but fractal
dimension 2.
70
73. Triadic Koch Curve :-
• Here we begin with a line segment. Divide it into thirds & replace the
centers third by the two adjacent sides of an equilateral triangle.
• This gives us a curve which begins & ends at the same place as the
original line segment but is built of 4 equal length segments, each 1/
the original length.
• So the curve has 4/3 the length of the original segment.
• Repeat the process for each of the 4 segments.
• It doesn't fill an area.
• It’s topological dimension is 1.
• The fractal dimension is 4=3D D=log
3
4=log4/log3=1.2618
i.e 16/9 times the original
• Point sets, curves & surfaces which give a fractal dimension greater
than the topological dimension are called fractals.
• The Hilbert curve & Koch curve are fractals because their fractal
dimensions(2 & 1,2618 resp.) are greater than their topological
dimension of 1. 73
74. Fractal Line
• Fractal line is generated by performing following steps.
1. If the straight line segment is specified by points (x1,y1,z1) &
(x2,y2,z2), find the midpoint of line by using
((x1+x2)/2,(y1+y2)/2,(z1+z2)/2)
(x1,y1,z1) (x2,y2,z2)
2 Add an offset to the midpoint such that the resultant midpoint
should not lie on the line itself. This can be achieved by
adding offset term to each co-ordinate as:
offset
(x1,y1,z1) (x2,y2,z2)
(((x1+x2)/2)+dx , ((y1+y2)/2)+dy , ((z1+z2)/2)+dz)
74
75. • In order to get random effect calculate the offset as
• dx=L*W*Gauss
• dy=L*W*Gauss
• dz=L*W*Gauss
Where L: length of the segment
W : waiting function governing the curve roughness( i.e
fractal dimension)
Gauss: Gaussian variable which returns random values
between -1 & 1 with 0 mean.
i.e. returned values consist of equal amount of +ve & -ve values.
3 The shifted midpoint divides the original line into two parts.
Repeat the same process for each part separately.
4 Repeat the process 1,2,3 until the segments become small
enough. Hence we get
75
76. Fractal Surfaces
• The concept of fractal line is extended to generate fractal
surfaces.
• Here we generate the fractal surfaces for triangular surface.
Given three vertex points in space, we shall generate a
fractal surface for the area between them.
1. Consider each edge of the triangle. We can imagine a fractal
line along each edge & compute its halfway point by using
same method as in fractal lines.
2. Now connect these halfway points with line segments. We
can subdivide the surface into four smaller triangles.
3. Subdivide until the triangles are too small to matter.
76