Frame.interpolate_frames

Frame.interpolate_frames(other, steps)[source]

Generates a specified number of interpolated frames between two given frames

Parameters:
othercompas.geometry.Frame
stepsint

The number of interpolated frames to return.

Returns:
list of compas.geometry.Frame

Examples

>>> frame1 = Frame(Point(0, 0, 0), Vector(1, 0, 0), Vector(0, 1, 0))
>>> frame2 = Frame(Point(1, 1, 1), Vector(0, 0, 1), Vector(0, 1, 0))
>>> steps = 5
>>> frames = frame1.interpolate_frames(frame2, steps)
>>> print(len(frames) == steps)
True