mt.geo2d.rect2oct
Utilities for converting a rectangle into an octagon bounded by it.
Functions
approx_oct()
: Converts a rectangle into an octagon inside it.
- mt.geo2d.rect2oct.approx_oct(min_x, min_y, max_x, max_y)
Converts a rectangle into an octagon inside it.
- Parameters:
min_x (float) – min x-coordinate
min_y (float) – min y-coordinate
max_x (float) – max x-coordinate
max_y (float) – max y-coordinate
- Returns:
polygon – list of 2D (x,y) points representing an octagon inside the rectangle (min_x, min_y, max_x, max_y)
- Return type:
numpy array
Variables
- mt.geo2d.rect2oct.ISQRT2
Double-precision floating-point number type, compatible with Python float and C
double
.- Character code:
'd'
- Canonical name:
numpy.double
- Alias:
numpy.float_
- Alias on this platform (Linux x86_64):
numpy.float64: 64-bit precision floating-point number type: sign bit, 11 bits exponent, 52 bits mantissa.
0.7071067811865475