Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task You will be submitting two source files: assn10.py and pattern.py. You will also submit your software development plan: plan.txt You are going to create

Task

You will be submitting two source files: assn10.py and pattern.py. You will also submit your software development plan: plan.txt

You are going to create a program that draws cool patterns. The user will have three modes to choose from:

Rectangle Pattern - A circular pattern created by drawing multiple rectangles

Circle Pattern - A circular pattern created by drawing multiple circles

Super Pattern - A random selection of some number of Rectangle and Circle Patterns

Code

assn10.py - Use the starter file given and only fill in the appropriate areas. Do not modify any code that is there already, only add to it. This file will help you with defining the functions in pattern.py.

pattern.py - You must define the following functions

reset() - Erase all of the patterns and start over

setup()

Configure turtle to draw quickly

Configure turtle to have a window of 1000 x 800

drawRectanglePattern()

Use appropriate parameters

It should call drawRectangle()

drawRectangle()

Use appropriate parameters

Should draw a SINGLE rectangle

drawCirclePattern()

Use appropriate parameters

drawSuperPattern()

Use appropriate parameters

Randomly draw Rectangle and Circle patterns. Each pattern should based on random values.

Use reasonable random values (some can be negative) so patterns are drawn on the screen

setRandomColor()

Do not use any parameters

Set turtle to draw in a random color

Use at least 3 colors

done()

Called when user quits

Keeps the turtle window open

Make sure to read the rubric to see the additional requirements.

Drawing Rectangle Pattern

The Rectangle Pattern has 6 parts to it

Center position - This is the x, y center point of the circular pattern that is drawn

Offset - This is the distance from the center position to the starting corner of each rectangle. It can be a positive or negative number

Height - The height of a rectangle

Width - The width of a rectangle

Count - The number of rectangles to draw within the 360 degree pattern.

Rotation - The number of degrees each rectangle is rotated in relation to the line from the Center Position to the starting corner of the rectangle

Each individual rectangle should be a new random color.

Drawing Circle Pattern

The Circle Pattern has 4 parts to it

Center position - This is the x, y center point of the circular pattern that is drawn

Offset - This is the distance from the center position to starting drawing point of each circle. It can be a positive or negative number. Note that the center point of each circle should be 'radius + offset' distance from the Center Position of the pattern.

Radius - The radius of the circle

Count - The number of circles to draw within the 360 degree pattern.

Each individual circle should be a new random color.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

Students also viewed these Databases questions

Question

What is a Temporal Method?

Answered: 1 week ago