Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

you will implement a simple GUI program that uses turtle graphics to generate parametric curves such as regular polygons, rose, and roulette curves. Your

you will implement a simple GUI program that uses turtle graphics to generate parametric curves such as import turtle import math # moves a turtle t on the GUI screen from one point to another creating a curve def

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

To create a simple GUI program using Pythons turtle library for drawing parametric curves like regular polygons rose curves and hypotrochoids and to p... 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

Transportation A Global Supply Chain Perspective

Authors: Robert A. Novack, Brian Gibson, Yoshinori Suzuki, John J. Coyle

9th Edition

1337406643, 9781337406642

More Books

Students also viewed these Programming questions