Question
I need help with this using python 3. Thanks You are going to create a program that draws cool patterns. The user will have three
I need help with this using python 3. Thanks
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
- assn11.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.
Rubric
3 pts: SoftwareDevelopment Lifecycle Plan (see assn #6 for description)
3 pts: Get input properly from users. You may assume the users give valid input
3 pts: main() is the only function defined in assn9.py, which also calls main()
Use the starter code properly
5 pts: Create a module called pattern.py.
This contains all of the functions associated with drawing the patterns
5 pts: Proper implementation and usage of reset()
5 pts: Proper implementation and usage of setup()
20 pts: Proper implementation and usage of drawRectanglePattern() as defined above
location, offset, width, height, count, and rotation are all used and drawn properly
10 pts: Proper implementation and usage of drawRectangle() as defined above
20 pts: Proper implementation and usage of drawCirclePattern() as defined above
location, offset, radius, and count are all used and drawn properly
10 pts: Proper implementation and usage of drawSuperPattern() as defined above
8 pts: Proper implementation and usage of setRandomColor() as defined above
5 pts: Proper implementation and usage of done() as defined above
3 pts: Follow proper coding conventions
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started