Question: in java a sierpinski Triangle is a fractal formed by drawing a triangle, A and then using the mid of each side of triangle to

in java

a sierpinski Triangle is a fractal formed by drawing a triangle, A and then using the mid of each side of triangle to form another triangle. This inner triangle is then removed. The result is three smaller triangles (one at the top and one in each corner) on which the process is repeated. After iteration N, the image will contain 3N triangles, each of which is similar to the origi- nal triangle. Write a program that implements a recursive algorithm for drawing a Sierpinski Triangle. The user interface for the program should include a Jslider that allows the user to select a value for N. The slider should allow the user to pic a value for N between 0 and the maximum value of N pos- sible based on the size of the program window. The maximum slider value should change as appropriate when the window is resized.

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!