Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please use python and # to explain what you are doing. please be aware there are hidden test all these photos are apart of the

please use python and # to explain what you are doing. please be aware there are hidden test
all these photos are apart of the same question
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
o Kinking polygons x) To kink a polygon, we simply klink every one of its segments. It looks like this. If the basic polypon is polyl - to... (1, 2), (2. oyi draw_polygon( poly) o Then its kinked version has to look like this: 20 15 10 05 00 Then its kinked version has to look like this: 20 15 10 0.5 0.0 -0.5 1.5 2.0 10 0.5 0.0 on function. Write below the kinked polygon function. U def kink_polygon (poly) YOUR CODE HERE (x) 0 0 0 You can use this space to debug your code. YOUR CODE HERE Let us check that the solution works as intended. u polyi - f(0, 0), (1, 2), (2, 0) poly2 - kink_polygon (polyi) draw_polygon(*poly) We can kink it one more time! poly3 - kink_polygon (poly) draw_polygon( *poly3) Let us check that your solution works. # D A polyl-((0, 0), (1, 2), (2, 0)) poly2 - kink polygon (polyi) approxeq(poly2. f(0, 0). (0.25, 0.5). (0.0, 1.25). Copy of Home_ipynb Let us check that your solution works. U polyi = [(0, 0), (1, 2), (2, 0)) poly2 = kink_polygon (polyl) approxeg(poly2, [(0, 0), (0.25, 0.5), (0.0, 1.25), (0.75, 1.5), (1, 2), (1.25, 1.5), (2.0, 1.25), (1.75, 0.5), (2, 0), (1.5, 0.0), (1.0, -0.5), (0.5, 0.01) poly3 kink_polygon (poly2) approxeg (poly3, [(0, 0), (0.0625, 0.125), (0.0, 0.3125), (0.1875, 0.375), (0.25, 0.5), (0.1875, 0.6875), (-0.0625, 0.8125), (0.0625, 1.0625), (0.0, 1.25), (0.1875, 1.3125), (0.3125, 1.5625), (0.5625, 1.4375), (0.75, 1.5), (0.8125, 1.625), (0.75, 1.8125), (0.9375, 1.875), (1, 2), (1.0625, 1.875), (1.25, 1.8125), (1.1875, 1.625), + Code + Text (1.1875, 1.625), (1.25, 1.5), (1.4375, 1.4375), (1.6875, 1.5625), (1.8125, 1.3125), (2.0, 1.25), (1.9375, 1.0625), (2.0625, 0.8125), (1.8125, 0.6875), (1.75, 0.5), (1.8125, 0.375), (2.0, 0.3125), (1.9375, 0.125), (2, 0), (1.875, 0.0), (1.75, -0.125), (1.625, 0.0), (1.5, 0.0), (1.375, -0.125), (1.375, -0.375), (1.125, -0.375), (1.0, -0.5), (0.875, -0.375), (0.625, -0.375), (0.625, -0.125), (0.5, 0.0), (0.375, 0.0), (0.25, -0.125). (0.125, 0.0))) Here are some hidden tests, just for the sake of suspense. 10 points. Kinking a polygon in the dark

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

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago