> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Objects.interpolation

Interpolation between keyframes of an event-based label row.

A non-`hold` upsert runs into the geometry of the object's next event when that event is an upsert (before a
`delete` it holds) and nothing is stored in between, so the formulas here are the label: they mirror the editor's
(`cord-frontend` `labels/events/linear.ts`, via three.js) and must not change. A new rule is a new mode.

#### InterpolationMode

`"hold"`: the geometry stands until the next event (what an unset field means). `"linear"`: it moves in a
straight line, over time, into the next upsert's.

#### INTERPOLATED\_CONFIDENCE

Confidence of a derived frame, matching the editor.

#### INTERPOLATION\_SHAPES

The shapes each non-`hold` mode supports. `hold` supports every shape.

#### check\_interpolation\_supported

```python theme={"dark"}
def check_interpolation_supported(mode: object, shape: object) -> None
```

Raise unless `mode` is readable on `shape` (a [Shape](/sdk-documentation/sdk-references/objects.common#shape-objects) or its value).

**Raises**:

* `ValueError` - For an unknown mode, or a mode the shape does not support.

#### interpolate

```python theme={"dark"}
def interpolate(mode: str, shape: Shape, start: EventCoordinates,
                end: EventCoordinates,
                fraction: float) -> Optional[EventCoordinates]
```

`start` a `fraction` of the way to `end` under `mode`, or None where it holds.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.