a.Provide a top-level decomposition of the problem of drawing a frieze pattern, assuming for the moment that the basic element is repeated just exactly 5 times. At this stage you are not trying to produce a solution, just break the problem down into smaller parts. We are looking for a decomposition that could apply to a frieze composed of any basic element, so for now you should just assume that the exact form of the basic element will be considered in a more detailed decomposition, so you can just say “draw basic element” for this step. Your initial decomposition should use exactly one loop. In the remainder of this question, you will design and implement a program to draw the particular frieze shown In this frieze the length of each of the eight "spokes” of the basic element is 40 and the angle between the spokes is 45º. Each repeat is 100 units to the right of the previous one, as measured from the centre of one basic element to the centre of the next (where the centre is the point where the spokes of a basic element meet). b.Next refine your decomposition, adding more detail so that it becomes an algorithm. This is not yet a program, so you should write the steps in English rather than as Python statements. To draw the basic element of the frieze you will need to use a second loop. c.Translate your algorithm into Python, including appropriate comments. Paste your Python code into your solution document as text and state whether it produced the expected output. Your answer must be a translation of your algorithm from (b), otherwise marks will be lost. Here and in Part (d) below you should use only techniques and language features taught in TM112. If you decide to use techniques or language features not covered in the module, you must give a justification for this, or marks will be lost. In part (c) your code always produces five repetitions of the basic element. Now modify your code so that the required number of repetitions is held in a variable number_of_elements, where number_of_elements is initialised to 5 in this case but can be initialised to a different value as required. Run your program using different values of number_of_elements to test that it produces the expected output.
a.Provide a top-level decomposition of the problem of drawing a frieze pattern, assuming for the moment that the basic element is repeated just exactly 5 times. At this stage you are not trying to produce a solution, just break the problem down into smaller parts. We are looking for a decomposition that could apply to a frieze composed of any basic element, so for now you should just assume that the exact form of the basic element will be considered in a more detailed decomposition, so you can just say “draw basic element” for this step. Your initial decomposition should use exactly one loop.
In the remainder of this question, you will design and implement a
-
In this frieze the length of each of the eight "spokes” of the basic element is 40 and the angle between the spokes is 45º. Each repeat is 100 units to the right of the previous one, as measured from the centre of one basic element to the centre of the next (where the centre is the point where the spokes of a basic element meet).
-
b.Next refine your decomposition, adding more detail so that it becomes an
algorithm . This is not yet a program, so you should write the steps in English rather than as Python statements. To draw the basic element of the frieze you will need to use a second loop. -
c.Translate your algorithm into Python, including appropriate comments.
Paste your Python code into your solution document as text and state whether it produced the expected output.
-
Your answer must be a translation of your algorithm from (b), otherwise marks will be lost.
Here and in Part (d) below you should use only techniques and language features taught in TM112. If you decide to use techniques or language features not covered in the module, you must give a justification for this, or marks will be lost.
-
In part (c) your code always produces five repetitions of the basic element. Now modify your code so that the required number of repetitions is held in a variable number_of_elements, where number_of_elements is initialised to 5 in this case but can be initialised to a different value as required.
Run your program using different values of number_of_elements to test that it produces the expected output.
![*****](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F43441e92-b7c8-4599-b90d-2666dd4e233a%2F179f3ed9-2ed5-4f0f-8dcf-faf8c5d75a08%2Fs0rlpwo_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)