Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python Problem 4. (Programming problem: Sweeping Trazepoidation algorithm, related to E2.9). In this exercise, youwll write functions that are used as part of the Sweeping
Python Problem
4. (Programming problem: Sweeping Trazepoidation algorithm, related to E2.9). In this exercise, youwll write functions that are used as part of the Sweeping Trapezoidation algorithm. Recall the input to this algorithm is a rectangular workspace with a polygonal obstacle described by a counter-clockwise se- quence of vertices). For simplicity assume that the polygonal obstacles do not overlap, their boundaries are non-vertical, non-horizontal segments, and they are strictly inside the rectangular workspace (a) For each obstacle vertex, v write a function that classifies it into the 6 possible types. (Step 6.1 in the lecture notes) Example: where W is the rectangular workspace. P 110.5, 0.5, 10.8, 0.31, 10.8, 0.81, 10.4, 0.911 P is a polygon which can have arbitrary number of vertices. v [0.5,0.5 Test vertex of the polygon type computeTypeSweepingTrapezoidation(W, P, v) type-6 4. (Programming problem: Sweeping Trazepoidation algorithm, related to E2.9). In this exercise, youwll write functions that are used as part of the Sweeping Trapezoidation algorithm. Recall the input to this algorithm is a rectangular workspace with a polygonal obstacle described by a counter-clockwise se- quence of vertices). For simplicity assume that the polygonal obstacles do not overlap, their boundaries are non-vertical, non-horizontal segments, and they are strictly inside the rectangular workspace (a) For each obstacle vertex, v write a function that classifies it into the 6 possible types. (Step 6.1 in the lecture notes) Example: where W is the rectangular workspace. P 110.5, 0.5, 10.8, 0.31, 10.8, 0.81, 10.4, 0.911 P is a polygon which can have arbitrary number of vertices. v [0.5,0.5 Test vertex of the polygon type computeTypeSweepingTrapezoidation(W, P, v) type-6Step 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