Triangles! Oh Fractals! Objective: Write a program in which draws (yes it actual
ID: 3666268 • Letter: T
Question
Triangles! Oh Fractals!
Objective:
Write a program in which draws (yes it actually makes a picture) a triangular fractal using recursion. This is best if done using a java applet.
Suggested Methodology
The idea for it is this
First draw a filled equilateral triangle
Next draw another filled equilateral triangle of a different color that’s upside down in the middle of that triangle
Using the other triangles formed repeat step 2 until a pixel limit of 4 is reached
HINTS:
It may be a good idea to look at the examples I gave 02/12/2015
The method fillPolygon(int[] xPoints, int[] yPoint, numberOfPoints) as called by the graphics device is important
The method setColor(Color aColor) is important for picking different colors to draw things.
Example Image of Results:
Explanation / Answer
In this method is where I want to recursively call the other triangles. I believe my parameters are correct but my other attempts have failed. Does anyone know I would go about doing this with the current code I have ?
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.