# Instagram O ning CoursesAnytime, anywhere domy d... + Assignment Func.docx

• Homework Help
• 3

This preview shows page 1 - 3 out of 3 pages.

Instagram O ning CoursesAnytime, anywhere domy d... + Assignment Functions and Recursion - Introduction to... Gct Homewaric Help With Choog Stucy Chee.com Get Homewarc Help With Chega Stucy Chess.com 2. Sierpinski (30 points). The Sierpirski triangle is an example of a fractal pattern like the H-tree pattern from Section 2.3 of the textbook. order 1 Druler 2 order 4 oder 5 byder 6 The Polish mathematician Wacaw Sierpiski described the pattern in 1915, but it has appeared in Italian art since the 13th century. Though the Sierpinski triangle looks complex, it can be generated with a short recursive function. Your main task is to write a recursive function sierpinskio that plots a Sierpinski triangle of order n to standard drawing. Think recursively: sierpinski should draw one filled equilateral triangle (pointed downwards) and then call itself recursively three times (with an appropriate stopping condition). It should draw 1 filled triangle for n = 1: 4 filled triangles for n = 2: and 13 filled triangles for n = 3; and so forth. API specification. When