sknano.core.geometric_regions.Rectangle.centroid

Rectangle.centroid

Rectangle centroid, \((c_x, c_y)\).

Computed as the 2D Point \((c_x, c_y)\) with coordinates:

\[c_x = \frac{x_{\mathrm{min}}+x_{\mathrm{max}}}{2}\]\[c_y = \frac{y_{\mathrm{min}}+y_{\mathrm{max}}}{2}\]
Returns:

Point

2D Point of centroid.