Question: Write a program that lets the user to enter the order and displays the filled Sierpinski triangles as shown in figures below. A Sierpinski triangle

Write a program that lets the user to enter the order and displays the filled Sierpinski

triangles as shown in figures below. A Sierpinski triangle is created as follows:

1. Begin with an equilateral triangle, which is considered to be a Sierpinski fractal of

order (or level) 0, as shown in Figure 0.

2. Connect the midpoints of the sides of the triangle of order 0 to create a Sierpinski

triangle of order 1 (in Figure 1).

3. Leave the center triangle intact. Connect the midpoints of the sides of the three other

triangles to create a Sierpinski triangle of order 2 (Figure 2).

4. Repeat the same process recursively to create a Sierpinski triangle of order 3, 4, ...,

and so on (Figure 3).

Write a program that lets the user to enter the order and

Submit the source code file - SierpinskiTriangleFractal.java

Sierpinski Trian SierpinskiTrian.. O Enter an order: Enter an order: Figure 0 Figure 1 SierpinskiTrian.. SierpinskiTrian.. Enter an order Enter an order Figure 2 Figure 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!