Frame.interpolate_frame

Frame.interpolate_frame(other, t)[source]

Interpolates between two frames at a given parameter t in the range [0, 1]

Parameters:
othercompas.geometry.Frame
tfloat

A parameter in the range [0-1].

Returns:
compas.geometry.Frame

A list of the interpolated compas.geometry.Frame instances.

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))
>>> start_frame = frame1.interpolate_frame(frame2, 0)
>>> allclose(start_frame.point, frame1.point) and allclose(start_frame.quaternion, frame1.quaternion)
True