Open
Description
Feature description
I would like to be able to multiply a polyhedron or polygon by a scaling factor, which would apply as a scalar multiplication to its vertex vectors. Similarly, radii of spheres or spheropolytopes would scale linearly.
Proposed solution
Implement __mul__
, etc: https://docs.python.org/3/library/operator.html#operator.__mul__
The operations should return a new shape instance.
Candidates:
__mul__
forshape * 1.5
__matmul__
forshape @ three_by_three_transformation_matrix
__truediv__
forshape / 1.5
Other things like negation (multiply all vertex vectors by -1), vector addition to all vertices, etc. are possible if desired.