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

>>> from compas.tolerance import TOL
>>> 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)
>>> TOL.is_allclose(start_frame.point, frame1.point) and TOL.is_allclose(start_frame.quaternion, frame1.quaternion)
True