A frieze pattern is a decoration made from repeated copies of a basic unit, arranged in a row. Figure 1 shows two examples from France in about 1820. Figure 1 Example friezes a.Provide a decomposition of the problem of drawing a frieze pattern, assuming for the moment that the basic unit is repeated just 7 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 any frieze, so you should for now ignore the details of how the basic unit will be drawn. You will need to use a loop.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

A frieze pattern is a decoration made from repeated copies of a basic unit, arranged in a row. Figure 1 shows two examples from France in about 1820.

Figure 1 Example friezes
  • a.Provide a decomposition of the problem of drawing a frieze pattern, assuming for the moment that the basic unit is repeated just 7 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 any frieze, so you should for now ignore the details of how the basic unit will be drawn. You will need to use a 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.

Figure 2 The frieze pattern for this question

In this frieze the length of each horizontal and vertical segment is 25.

  • 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 unit 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 it produces the basic unit shown in Figure 2.

    Paste your Python code into your solution document as text and state whether it produced the expected output.

    Also include the code file in your TMA zip file.

    Your answer must be a translation of your algorithm from part 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.

    (11 marks)

  • d.Save the code file again, this time as Q2_OUCU_d.py. Then modify it so that repeats the basic unit number_of_units times, where number_of_units is a variable which is initialised to 7, but can be initialised to a different value as required.

    Run your program using different values of number_of_units to test that it produces the expected output.

    Paste your Python code into your solution document as text and state whether it produced the expected output.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

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 it produces the basic unit shown in Figure 2.

Paste your Python code into your solution document as text and state whether it produced the expected output.

Also include the code file in your TMA zip file.

Your answer must be a translation of your algorithm from part 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.

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Processes of 3D Graphics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education