English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Since ploygons can be any shape, how do you determine statistics such as min, average, maximum width? I can do it for some simple cases but always seem to find exceptions that break the algorithm

2007-03-09 03:44:45 · 1 answers · asked by Zefram 2 in Computers & Internet Programming & Design

1 answers

To find the maximum width you could try calculating the distances between all the vertices. Since all the sides are straight lines, the distance between the two vertices that are furthest apart should equal the maximum width of the polygon.

As for minimum and average width, how are you defining them? 'Minimum' width is always going to tend to zero at one of the convex vertices, and 'average' width seems impossible to define let alone calculate.

2007-03-09 04:38:57 · answer #1 · answered by Groucho Returns 5 · 0 0

fedest.com, questions and answers