(programming required) Write a recursive function sierpinskiTriangle(level, length, x, y), in a language of your choice, to draw a Sierpinski triangle of side length length at level level with...




(programming required) Write a recursive function sierpinskiTriangle(level, length, x, y), in a language of your choice, to draw a Sierpinski triangle of side length length at level level with bottom-left coordinate hx, yi. (You’ll need to use some kind of graphics package with line-drawing capability.) Write your function so that—in addition to drawing the fractal—it returns both the total length and total area of the triangles that it draws. Use your function to verify some small cases of Exercises 5.15 and 5.18.


Exercises 5.15 and 5.18


5.18 Sierpinski triangle 5.19 Sierpinski carpet







May 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here