ComfyUI Node
CV Points To Polar
Polar coordinates of each point relative to an origin: distance, angle in degrees [0, 360) and the unit direction vector. The direction points are ideal k-means features when grouping points by bearing (points along one ray collapse to a single direction regardless of how far out they sit) - cluster them with the 'CV K-Means Points' subgraph blueprint while keeping the original points for drawing.
CV Points To Polar
- points
- radius
- angle
- directions
- count
◄origin_x0.00►
◄origin_y0.00►
◄angle_conventionclockwise from 12 o'clock (clock)►
Categoryimage/CV/points
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| points | NPARRAY | Nx1x2 point array to convert (or None -> 0 points). | |
| origin_x | FLOAT | 0.00-1000000–1000000 | X pixel coordinate of the reference origin (e.g. the dial center, anchor, or ray start). |
| origin_y | FLOAT | 0.00-1000000–1000000 | Y pixel coordinate of the reference origin (e.g. the dial center, anchor, or ray start). |
| angle_convention | COMBO | clockwise from 12 o'clock (clock) | Clock convention: 12h = 0, 3h = 90, 6h = 180. Math convention: +x = 0, growing counter-clockwise (y up). |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| radius | NPARRAY | (N,) float32 distances. |
| angle | NPARRAY | (N,) float32 degrees [0, 360). |
| directions | NPARRAY | Nx1x2 float32 unit vectors (0,0 for points on the origin) - k-means features for grouping by bearing. |
| count | INT | — |