fixed_convex_hull_humus
fixed_convex_hull_humus(output, output_offset, output_point_count, input_points, input_point_count) ⇒ number
Compute a bounding polygon with a fixed given number of vertices such that the area would be minimal Uses combinatorial sets of edges to find the subset, which when extending those edges produces poly with minimum area NOTE: very very slow as it's O(n^k) where n is number of edges and k is number of points on the desired bounding polygon
Kind: global function
Returns: number
- number of points added to the output
See
- 2014 "Implementation of linear minimum area enclosing triangle algorithm" Ovidiu Pârvu & David Gilbert
- https://github.com/MagnusTiberius/humus3/blob/9d43412d6e6be869e224817f0a966fe48a1af40f/Util/ConvexHull.cpp#L281
Param | Type | Description |
---|---|---|
output | Array.<number> | Float32Array | result will be written here |
output_offset | number | offset into output array where to write the result |
output_point_count | number | number of points to comprise bounding polygon |
input_points | Array.<number> | Points to be bounded, must be an ordered loop. Must form a convex hull |
input_point_count | number | number of points in the input to consider |
- fixed_convex_hull_humus(output, output_offset, output_point_count, input_points, input_point_count) ⇒
number
- ~s :
Array.<number>
- ~process_combination(subset)
- ~s :
fixed_convex_hull_humus~s : Array.<number>
Kind: inner constant of fixed_convex_hull_humus
fixed_convex_hull_humus~process_combination(subset)
Kind: inner method of fixed_convex_hull_humus
Param | Type |
---|---|
subset | Array.<number> | Uint16Array |