Homework 05

Triangles! Oh Fractals!

Due 11/15/2024 by 11:55PM

 

Objective:

Write a program in which it draws a triangular fractal called Sierpinski’s Triangle using recursion and Java Swing. 

 

Requirements:

 

 

Suggested Methodology

The idea for it is this

  1. First draw a filled triangle
  2. Next draw another filled triangle of a different color that’s upside down in the middle of that triangle
  3. Using the other triangles formed repeat step 2 until a pixel limit of 4 is reached

 

Additional Notes: 

 

 

Example Image of Results:

 

 

Finally:

Submit the Java Source Files (.JAVA) to the CSCE Dropbox (https://dropbox.cse.sc.edu)