or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

array-creation.mdbinning-histogramming.mdcoordinate-systems.mdcore-data-structures.mdindex.mdinput-output.mdmathematical-operations.mdreduction-operations.mdscipy-integration.mdshape-operations.mdspatial-operations.mdtesting-utilities.mdunits-system.mdvisualization.md

spatial-operations.mddocs/

0

# Spatial Operations

1

2

Vector operations, coordinate transformations, rotations, translations, and spatial geometry functions.

3

4

## Capabilities

5

6

### Vector Operations

7

8

Functions for creating and manipulating 3D vectors and spatial data.

9

10

```python { .api }

11

def vector(value, *, unit=None):

12

"""Create a scalar 3D vector variable"""

13

14

def vectors(dims, values, *, unit=None):

15

"""Create array of 3D vectors"""

16

17

def as_vectors(x, y, z):

18

"""Combine components into vectors"""

19

20

def norm(x):

21

"""L2 norm of vectors"""

22

23

def dot(x, y):

24

"""Dot product of vectors"""

25

26

def cross(x, y):

27

"""Cross product of 3D vectors"""

28

```

29

30

### Spatial Transformations

31

32

Functions for spatial coordinate transformations including rotations and translations.

33

34

```python { .api }

35

def rotation(*, value):

36

"""Create rotation from quaternion"""

37

38

def rotations(*, dims, values):

39

"""Create rotation array"""

40

41

def translation(*, value, unit=None):

42

"""Create translation transformation"""

43

44

def translations(*, dims, values, unit=None):

45

"""Create translation array"""

46

47

def linear_transform(*, value, unit=None):

48

"""Create linear transformation"""

49

50

def affine_transform(*, value, unit=None):

51

"""Create affine transformation"""

52

53

def inv(x):

54

"""Inverse transformation"""

55

```