logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Luis RiveraFinance
(5/5)

728 Answers

Hire Me
expert
Bhupesh SinglaComputer science
(5/5)

682 Answers

Hire Me
expert
Sarita VashisthEconomics
(5/5)

740 Answers

Hire Me
expert
Amit KumarComputer science
(5/5)

892 Answers

Hire Me
Others
(5/5)

how can we express what it means mathematically or computationally

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Inside the file sierpinski.py is a function called sierpinski(). The function takes several inputs. • The first parameter, degree, is the degree of the Sierpinski Triangle—how many further levels of recursion will be applied when drawing the Triangle. • The next three parameters, p1, p2, p3, are the points that will be used to draw the next triangle. • The fourth parameter, color, is the initial color that will be used to draw the Triangle. • The fifth parameter, line_width, is used to specify the width of the line used to draw the Triangle. This should be a positive integer. If it is set to 0, then the Triangle will be filled with the selected color when drawn. • The final parameter, screen, is the pygame surface object upon which the Triangle will be drawn. You should not have to change the value passed to this parameter. You are given a function, draw_triangle(), that will draw a triangle on the given surface at the given points in the given color. You must implement the function find_midpoint(), which takes two points as input, and which returns the point that is midway between the two input points. Students should use the draw_triangle() and find_midpoint() functions in order to implement the sierpinski() function. Their implementation will be recursive. The sierpinski() function will call itself. Think about how many recursive calls must be made in each call to the sierpinski() function. Think about when and how to stop the recursion so that you construct a Sierpinski Triangle of the given degree. Experiment with color, line width, etc. to see what sort of effects you can produce when drawing the Sierpinski Triangle. Submission: Turn in the sierpinski.py file with the completed find_midpoint() and sierpinski() functions through Blackboard. A diversion: fractal dimension: In grade school, we learn that the dimension of a line segment is one, the dimension of a square is two, and the dimension of a cube is three. But you probably didn't learn what is really meant by dimension. How can we express what it means mathematically or computationally?

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme