|
Algorithm 1. Judgement Method of Square Symmetrical Environment |
|
Input: A set of N points
|
|
Output: Symmetrical environment or not |
| 1: Convert raw data to coordinate data , ignore angle parameter |
| 2: Calculate geometric centroid
|
| 3: Calculate new distance data from
|
| 4: Descending sort as
|
| 5: Count the number of maximum values and number of minimum values
|
| 6: If then |
| 7: Environment is not square symmetrical |
| 8: End if, terminate |
| 9: Calculate the Euclidean distance between two adjacent points , , , in turn |
| 10: If , , , are not equal then |
| 11: Environment is not square symmetrical |
| 12: End if, terminate |
| 13: Fit 4 lines by connecting adjacent two points in turn from 4 maximum distance points |
| 14: Count the vertical distances from the remaining points to the 4 lines |
| 15: If all distances less than which infinitely close to zero then |
| 16: Environment is square symmetrical |
| 17: Save the G‒V distance to the G‒V index list |
| 18: else |
| 19: Environment is not square symmetrical |
| 20: End if, terminate |