a. Provide a top-level decomposition of the problem of drawing a frieze pattern, assuming for the moment that the basic
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
a. Provide a top-level decomposition of the problem of drawing a frieze pattern, assuming for the moment that the basic
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. (4 marks) In the remainder of this question, you will design and implement a program to draw the particular frieze shown in Figure 2. Save page as... Create shortcut... Name window... Clear browsing data... Extensions Task manager ***** Developer tools Figure 2 The frieze pattern for this question 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. (8 marks) C. Translate your algorithm into Python, including appropriate comments. Name your Python file Q2_OUCU_c.py, where 'OUCU' is your OU computer username, e.g. abc123. Run your program to test that it produces an output corresponding to Figure 2. Paste your Python code into your solution document as text and state whether it produced the expected output.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!