Question: Write an A5Q1 class containing a main method calling a recursive method to draw Sierpinski triangles (http://en.wikipedia.or are equilateral triangles that can be drawn recursively.

 Write an A5Q1 class containing a main method calling a recursive
method to draw Sierpinski triangles (http://en.wikipedia.or are equilateral triangles that can be

Write an A5Q1 class containing a main method calling a recursive method to draw Sierpinski triangles (http://en.wikipedia.or are equilateral triangles that can be drawn recursively. You will use the StdDraw class to draw the triangles ski triangle). Sierpinski triangles 3.2 THE DRAWTRIANGLES METHODS Define two drawTriangles methods, one non-recursive, and one recursive method. The non-recursive version simply calls the recursive version. The recursive version will draw a "level n" Sierpinski triangle. A "level 1" triangle is just an ordinary equilateral triangle. A level n" triangle is made up of three smaller "level n-1" Sierpinski triangles, as defined below

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!