Question: The coordinates for the polygons are given as : polygon1 :2,3;4.1,4.2;5.2,1.5;2.9,1.2 polygon2: 5.2,4.9;5.8,6.8;8.1,8.0;8.9,5;7.6,2.9;7.1,5.3 polygon3: 1.2,7.0;2.1,8.2;4.5,7.9;3.2,5.1 These coordinates are connected clockwise to create 3 different polygons.

 The coordinates for the polygons are given as : polygon1 :2,3;4.1,4.2;5.2,1.5;2.9,1.2

The coordinates for the polygons are given as :

polygon1 :2,3;4.1,4.2;5.2,1.5;2.9,1.2 polygon2: 5.2,4.9;5.8,6.8;8.1,8.0;8.9,5;7.6,2.9;7.1,5.3 polygon3: 1.2,7.0;2.1,8.2;4.5,7.9;3.2,5.1

These coordinates are connected clockwise to create 3 different polygons. When the polygons are formed I need to check which vertex is reflexive. If the vertex is reflexive, I need to add it to a list with its coordinates. For example if vertex 1 is a reflexive vertex, then my list would have the x and y coordinates of vertex 1.

Here is the skeleton that was provided in spr.py

def findReflexiveVertices(polygons): vertices=[] # Your code goes here # You should return a list of (x,y) values as lists, i.e. # vertices = [[x1,y1],[x2,y2],...] return vertices

Using python 2.7

Can anybody help me wit the code to implement this function?

Problem 1 [110 points]. Shortest Path Roadmap algorithm for a translating square. You will be implementing the Shortest Path Roadmap algorithm for a point robot. The robot resides in a region with the lower left corner being (0,0) and the upper right corner being (10, 10) There are multiple polygonal obstacles in the region. An example of the obstacles are provided in the file env.01.txt. In the file, each line represents a list of clockwise arranged x-y coordinates that define a polygonal obstacle. To see a visualization of the environment, you may run the following code python visualize.py env.01.txt You are also given a skeleton file spr.py to work with. The current code takes in as arguments a file describing the polygonal obstacles, and coordinates for the start and goal configurations. For example, you should be able to run the command python spy.py env.01.txt 1.0 2.0 3.0 4.0 You are to implement the Shortest Path Roadmap algorithm following the steps listed below. 1. Compute the reflexive vertices [20 points]. You are to implement the function findReflexiveVertices (polygons) to identify all reflexive vertices. The vertices should be returned as a list (see spr.py for more details). Problem 1 [110 points]. Shortest Path Roadmap algorithm for a translating square. You will be implementing the Shortest Path Roadmap algorithm for a point robot. The robot resides in a region with the lower left corner being (0,0) and the upper right corner being (10, 10) There are multiple polygonal obstacles in the region. An example of the obstacles are provided in the file env.01.txt. In the file, each line represents a list of clockwise arranged x-y coordinates that define a polygonal obstacle. To see a visualization of the environment, you may run the following code python visualize.py env.01.txt You are also given a skeleton file spr.py to work with. The current code takes in as arguments a file describing the polygonal obstacles, and coordinates for the start and goal configurations. For example, you should be able to run the command python spy.py env.01.txt 1.0 2.0 3.0 4.0 You are to implement the Shortest Path Roadmap algorithm following the steps listed below. 1. Compute the reflexive vertices [20 points]. You are to implement the function findReflexiveVertices (polygons) to identify all reflexive vertices. The vertices should be returned as a list (see spr.py for more details)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!