You are on page 1of 7

Terna Engineering College

Computer Engineering Department


Program: Sem III

Course: Computer Graphics

Faculty: Neha Harde

LAB Manual

PART A
(PART A : TO BE REFFERED BY STUDENTS)

Experiment No.09
A.1 Aim:
Implement Koch Curve.

A.2 Prerequisite:
1. C Language.
2. Geometric Concepts.
3. Curve Generation.

A.3 Outcome:
After successful completion of this experiment students will be able to,

Implementation of curve and fractal generation.

A.4 Theory:

1. The Koch snowflake can be constructed by starting with an equilateral triangle, then
recursively altering each line segment as follows:

1. Divide the line segment into three segments of equal length.

2. Draw an equilateral triangle that has the middle segment from step 1 as its
base and points outward.
3. Remove the line segment that is the base of the triangle from step 2.

4. After one iteration of this process, the resulting shape is the outline of a
hexagram.

2. The Koch snowflake is the limit approached as the above steps are followed over and
over again.

3. The Koch curve originally described by Koch is constructed with only one of the three
sides of the original triangle.

4. In other words, three Koch curves make a Koch snowflake.

A.5 Procedure:

Step1:
Draw an equilateral triangle. You can draw it with a compass or protractor, or just eyeball it
if you don’t want to spend too much time drawing the snowflake.
• It’s best if the length of the sides are divisible by 3, because of the nature of this fractal. This
will become clear in the next few steps.
Step2:
Divide each side in three equal parts. This is why it is handy to have the sides divisible by
three.
Step3:
Draw an equilateral triangle on each middle part. Measure the length of the middle third to
know the length of the sides of these new triangles.
Step4:
Divide each outer side into thirds. You can see the 2nd generation of triangles covers a bit
of the first. These three line segments shouldn’t be parted in three.

Step5:
Draw an equilateral triangle on each middle part.
• Note how you draw each next generation of parts that are one 3rd of the mast one.
PART B
(PART B : TO BE COMPLETED BY STUDENTS)

Roll No. C28 Name: Prathmesh Krishna Gaikwad


Class : SE-C Batch : B-1
Date of Experiment: 24/11/2021 Date of Submission: 24/11/2021
Grade :

B.1 Document created by the student:


OUTPUT-
B.3 Observations and learning:

Ans- We observed that a Koch curve which is a type of fractal curve it has a
shape of snowflake.

B.4 Conclusion:

Ans- Hence, we have successfully learned to apply Koch Curve & implements in C.

B.5 Question of Curiosity


Q.1] Explain the properties of Koch Curve.

Ans-
i)The Koch snowflake (also known as the Koch curve, star, or island) is a mathematical
curve and one of the earliest fractal curves to have been described.
ii)A Koch curve is a fractal generated by a replacement rule. This rule is, at each step,
to replace the middle 131/3 of each line segment with two sides of a right triangle
having sides of length equal to the replaced segment.
iii)This quantity increases without bound; hence the Koch curve has finite length.
iv)However, the curve still bounds a finite area.
v)We can prove this by noting that in each step, we add an amount of area equal to the
area of all the equilateral triangles created.

Q.2] Is Koch Curve a fractal? Why?

Ans- The Koch snowflake (also known as the Koch curve, Koch star, or Koch island) is
a fractal curve and one of the earliest fractals to have been described. It is based on the Koch
curve, which appeared in a 1904 paper titled "On a Continuous Curve Without Tangents,
Constructible from Elementary Geometry" by the Swedish mathematician Helge von Koch.A
Koch curve is a fractal generated by a replacement rule. This rule is, at each step, to replace the
middle 131/3 of each line segment with two sides of a right triangle having sides of length equal
to the replaced segment.
Q.3] Implement Koch Curve.

Ans-

Step1:
Draw an equilateral triangle. You can draw it with a compass or protractor, or just eyeball it
if you don’t want to spend too much time drawing the snowflake.
• It’s best if the length of the sides are divisible by 3, because of the nature of this fractal. This
will become clear in the next few steps.
Step2:
Divide each side in three equal parts. This is why it is handy to have the sides divisible by
three.

Step3:
Draw an equilateral triangle on each middle part. Measure the length of the middle third to
know the length of the sides of these new triangles.
Step4:
Divide each outer side into thirds. You can see the 2nd generation of triangles covers a bit
of the first. These three line segments shouldn’t be parted in three.

Step5:
Draw an equilateral triangle on each middle part.
• Note how you draw each next generation of parts that are one 3rd of the mast one.

************************

You might also like