Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in python please Taking advantage of the implementation of drac_polylinel) and the approach in dray_regular_polypont) write a Python function def drak_star( n, outer, inner_, center,
in python please Taking advantage of the implementation of drac_polylinel) and the approach in dray_regular_polypont) write a Python function def drak_star( n, outer, inner_", center, canvas, startanlee) where in the number of paints, outers and inners are the radia for the coinotetric circles around the center point of the star that determines how the tips are to be drawn The canvas is the canvas object obtained from the ezgraphics module The start angle determines how much the shape should be rotated with respect to the hors tonal You can see a guided drawing that demonstrates how you should be computing the vertices of the star with 5 tips In the figure below where ne the outer radius would be the radius of the circle, and the inner radius would be the radius of the green circle In [11]: Traget smages/png/starde, width:300) Out (11) With the following setup, the example call provided further below should run as shown fron argraphics Import Graphic window wo. Oraphicandow 1000, 1000) canvas = win.canvas() Example 1: draw_star( 5, 3e0, 150, (see, soe), canvas, start angleze ) should produce In (12): Inage( 'inages/star-example-5-300-150.png', width400) Out [12] Example 2. draw_star( 8, 3ee, 150, (500, 500), canvas, start angleze ) should produce [9]: Image( "images/star-example-8-300-150.png', width=480 ) ut (9)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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