you will implement a simple GUI program that uses turtle graphics to generate parametric curves such...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
you will implement a simple GUI program that uses turtle graphics to generate parametric curves such as regular polygons, rose, and roulette curves. Your program should use two windows: one window is the standard output (stdout) that displays the output of print and input functions, the other window is a graphical user interface (GUI) that displays curves. In the stdout, your program should produce the following output: Welcome to Graphical Studio! Please choose one of the following options: 1. Draw a polygon 2. Draw a rose curve 3. Draw a hypotrochoid 4. Quit If the user chooses 4, the program closes an open GUI window, prints the following message, and terminates the program: Goodbye! If the user enters 1, 2, or 3, the program asks the user to enter parameters size, n, d on one line separated by a comma: Please enter three parameters size, n, and d separated by a comma: Activate Wind Go to Settings to import turtle import math # moves a turtle t on the GUI screen from one point to another creating a curve def draw(points, t): write your code here #generates points in the form of a list of tuples of Cartesian coordinates (x, y). def polygon(size, n, d): points = [] write your code here return points # generates points in the form of a list of tuples of Cartesian coordinates (x, y) def rose(size, n, d): points = [] write your code here return points # generates points in the form of a list of tuples of Cartesian coordinates (x, y) def hypotrochoid (size, n, d): points = [] write your code here. return points # main program if _name_ == '__main__': write your code here You need to implement four functions: polygon(), rose(), hypotrochoid(), and draw(). The first three functions should generate a list of tuples (x, y), where x and y are the coordinates of a point in the Cartesian coordinate system. Use you will implement a simple GUI program that uses turtle graphics to generate parametric curves such as regular polygons, rose, and roulette curves. Your program should use two windows: one window is the standard output (stdout) that displays the output of print and input functions, the other window is a graphical user interface (GUI) that displays curves. In the stdout, your program should produce the following output: Welcome to Graphical Studio! Please choose one of the following options: 1. Draw a polygon 2. Draw a rose curve 3. Draw a hypotrochoid 4. Quit If the user chooses 4, the program closes an open GUI window, prints the following message, and terminates the program: Goodbye! If the user enters 1, 2, or 3, the program asks the user to enter parameters size, n, d on one line separated by a comma: Please enter three parameters size, n, and d separated by a comma: Activate Wind Go to Settings to import turtle import math # moves a turtle t on the GUI screen from one point to another creating a curve def draw(points, t): write your code here #generates points in the form of a list of tuples of Cartesian coordinates (x, y). def polygon(size, n, d): points = [] write your code here return points # generates points in the form of a list of tuples of Cartesian coordinates (x, y) def rose(size, n, d): points = [] write your code here return points # generates points in the form of a list of tuples of Cartesian coordinates (x, y) def hypotrochoid (size, n, d): points = [] write your code here. return points # main program if _name_ == '__main__': write your code here You need to implement four functions: polygon(), rose(), hypotrochoid(), and draw(). The first three functions should generate a list of tuples (x, y), where x and y are the coordinates of a point in the Cartesian coordinate system. Use
Expert Answer:
Answer rating: 100% (QA)
To create a simple GUI program using Pythons turtle library for drawing parametric curves like regular polygons rose curves and hypotrochoids and to p... View the full answer
Related Book For
Transportation A Global Supply Chain Perspective
ISBN: 9781337406642
9th Edition
Authors: Robert A. Novack, Brian Gibson, Yoshinori Suzuki, John J. Coyle
Posted Date:
Students also viewed these programming questions
-
Suppose that Sudbury Mechanical Drifters is proposing to invest $10.4 million in a new factory. It can depreciate this investment straight-line over 10 years. The tax rate is 35%, and the discount...
-
Assignment 5: Hash Table implementation andconcordance There are three parts to this assignment. In the first two parts,you will complete the implementation of a hash map and aconcordance program. In...
-
In this section, we're going to look at a Python program that uses turtle graphics to play a simple game. The object of the game is to launch the turtle like a projectile so it hits the target. You...
-
A heating section consists of a 10 inch diameter duct which houses a 8 kW electric resistance heater. Air enters the heating section at 14.7 psia, 40oF and 35% relative humidity at a velocity of 21...
-
Bag A contains 3 red, 6 black, and 5 white balls, and bag B contains 4 red, 5 black, and 7 white balls. A bag is selected at random and a ball is drawn. If the ball is white, what is the probability...
-
Becton Labs, Inc., produces various chemical compounds for industrial use. One compound, called Fludex, is prepared using an elaborate distilling process. The company has developed standard costs for...
-
What is a configuration baseline?
-
Emery Pharmaceutical uses an unstable chemical compound that must be kept in an environment where both temperature and humidity can be controlled. Emery uses 800 pounds per month of the chemical,...
-
Requirements: 1) Complete adjusted trial balance of worksheet 2) Use your completed worksheet to prepare (a) multi-step or single-step net income statement, (b) statement of owner's equity and (c) a...
-
Harrison and Gloria have been negotiating over the sale of bulk raw materials (lumber, iron and steel). Each party has had an army of lawyers acting on both sides trying to get the deal done and it...
-
WTO favors the trend in globle bussiness toward deregulation
-
One possible check on administrative agency power is transparency. What does transparency mean in the context of government regulation? What specific laws and government websites help ensure that...
-
Catastrophe Management Solutions is a customer service support center for insurance companies. In 2010, the company put out a help wanted ad for customer service representatives who had basic...
-
Shirley Jones, a well-known actress and California resident, brought a lawsuit in California court against the president of the National Enquirer newspaper and one of its reporters. The National...
-
Bridget applied for a TV news commentators job. She has adequate experience to satisfy the job description but was denied the job. Bridget has a substantial birthmark that covers one side of her...
-
Marla, a North Dakota resident, decides to take a road trip to Arkansas. While she is vacationing in Arkansas she is hit by a car driven by Jasper, a Georgia resident who also happens to be...
-
Calculate the z-score and the percentage of people in the population scoring above the score, assuming: x = 32. mean = 50, standard deviation = 7 Z-Score % above 32 Calculate the 2-score and the...
-
Refer to the Conservation Ecology (Dec. 2003) study of the causes of forest fragmentation, presented in Exercise 2.166 (p. 97). Recall that the researchers used advanced high-resolution satellite...
-
Describe the three types of strategies that a company can deploy to proactively limit its transportation risks.
-
Discuss the role of transportation information and how it supports network visibility, control, and service consistency.
-
Discuss how companies can use the Internet of Things and other technologies to understand and respond to transportation risk.
-
Describe the principle parts of a lathe with a neat sketch.
-
How a lathe is specified? Explain with a neat diagram.
-
How do you classify a lathe? Explain briefly.
Study smarter with the SolutionInn App