Sphere.transform

Sphere.transform(transformation)[source]

Transform the sphere.

Parameters

transformation (compas.geometry.Transformation) – The transformation used to transform the Sphere. Note that non-similarity preserving transformations will not change the sphere into an ellipsoid. In such case, the radius of the sphere will be scaled by the largest scale factor of the threee axis.

Returns

None

Examples

>>> from compas.geometry import Frame
>>> from compas.geometry import Transformation
>>> from compas.geometry import Sphere
>>> sphere = Sphere(Point(1, 1, 1), 5)
>>> frame = Frame([1, 1, 1], [0.68, 0.68, 0.27], [-0.67, 0.73, -0.15])
>>> T = Transformation.from_frame(frame)
>>> sphere.transform(T)