---
url: /dyad/stable/stdlib/MultibodyComponents/components/TransformAbsoluteVector.md
description: >-
  Dyad TransformAbsoluteVector docs.  Rotates a pure-rotation 3-vector (e.g. a
  force, velocity, or angular velocity; never a position) between frames via a
  two-step rotation thro...
---

# `TransformAbsoluteVector` {#TransformAbsoluteVector}

Rotates a pure-rotation 3-vector (e.g. a force, velocity, or angular velocity; never a position) between frames via a two-step rotation through the world frame: `frame_r_in -> world -> frame_r_out`.

`frame_a` supplies only an orientation (`frame_a.R`); its position is never used, so this component is quantity-agnostic – it works identically for any 3-vector that transforms as a pure rotation.

## Usage {#Usage}

`MultibodyComponents.TransformAbsoluteVector()`

## Parameters: {#Parameters:}

|          Name |                      Description | Units |           Default value |
| -------------:| --------------------------------:| -----:| -----------------------:|
|  `frame_r_in` |  Frame in which r_in is resolved |     – | ResolveInFrame.FrameA() |
| `frame_r_out` | Frame in which r_out is resolved |     – | ResolveInFrame.FrameA() |

## Connectors {#Connectors}

* `frame_a` - Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or several `Frame`

connectors that can be connected together ([`Frame3D`](/stdlib/Dyad/connectors/Frame3D#Frame3D))

* `frame_resolve` - Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or several `Frame`

connectors that can be connected together ([`Frame3D`](/stdlib/Dyad/connectors/Frame3D#Frame3D))

* `r_in_x` - This connector represents a real signal as an input to a component ([`RealInput`](/stdlib/Dyad/connectors/RealInput#RealInput))

* `r_in_y` - This connector represents a real signal as an input to a component ([`RealInput`](/stdlib/Dyad/connectors/RealInput#RealInput))

* `r_in_z` - This connector represents a real signal as an input to a component ([`RealInput`](/stdlib/Dyad/connectors/RealInput#RealInput))

* `r_out_x` - This connector represents a real signal as an output from a component ([`RealOutput`](/stdlib/Dyad/connectors/RealOutput#RealOutput))

* `r_out_y` - This connector represents a real signal as an output from a component ([`RealOutput`](/stdlib/Dyad/connectors/RealOutput#RealOutput))

* `r_out_z` - This connector represents a real signal as an output from a component ([`RealOutput`](/stdlib/Dyad/connectors/RealOutput#RealOutput))

## Variables {#Variables}

|    Name |                                Description | Units |
| -------:| ------------------------------------------:| -----:|
|  `r_in` |                                            |     – |
|    `R1` | Rotation matrix from world into frame_r_in |     – |
| `r_out` |                                            |     – |

## Behavior {#Behavior}

$$ \begin{align}
\mathtt{frame_a.f}\_{1}\left( t \right) &= 0 \\
\mathtt{frame_a.f}\_{2}\left( t \right) &= 0 \\
\mathtt{frame_a.f}\_{3}\left( t \right) &= 0 \\
\mathtt{frame_a.tau}\_{1}\left( t \right) &= 0 \\
\mathtt{frame_a.tau}\_{2}\left( t \right) &= 0 \\
\mathtt{frame_a.tau}\_{3}\left( t \right) &= 0 \\
\mathtt{r_out_x}\left( t \right) &= \mathtt{r_in_x}\left( t \right) \\
\mathtt{r_out_y}\left( t \right) &= \mathtt{r_in_y}\left( t \right) \\
\mathtt{r_out_z}\left( t \right) &= \mathtt{r_in_z}\left( t \right)
\end{align}
$$

## Source {#Source}

```dyad
"""
Rotates a pure-rotation 3-vector (e.g. a force, velocity, or angular velocity;
never a position) between frames via a two-step rotation through the world
frame: `frame_r_in -> world -> frame_r_out`.

`frame_a` supplies only an orientation (`frame_a.R`); its position is never
used, so this component is quantity-agnostic -- it works identically for any
3-vector that transforms as a pure rotation.
"""
component TransformAbsoluteVector
  frame_a = Frame3D() {
    "Dyad": {"placement": {"diagram": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050}}}
  }
  frame_resolve = Frame3D() if case(frame_r_in, ResolveInFrame.FrameResolve) or case(frame_r_out, ResolveInFrame.FrameResolve) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  r_in_x = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -40, "y1": 140, "x2": 60, "y2": 240, "rot": 0}
      },
      "tags": []
    }
  }
  r_in_y = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -40, "y1": 450, "x2": 60, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  r_in_z = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -40, "y1": 760, "x2": 60, "y2": 860, "rot": 0}
      },
      "tags": []
    }
  }
  r_out_x = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 140, "x2": 1060, "y2": 240, "rot": 0}
      },
      "tags": []
    }
  }
  r_out_y = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  r_out_z = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 760, "x2": 1060, "y2": 860, "rot": 0}
      },
      "tags": []
    }
  }
  "Frame in which r_in is resolved"
  structural parameter frame_r_in::ResolveInFrame = ResolveInFrame.FrameA()
  "Frame in which r_out is resolved"
  structural parameter frame_r_out::ResolveInFrame = ResolveInFrame.FrameA()
  variable r_in::Real[3] if frame_r_in != frame_r_out
  "Rotation matrix from world into frame_r_in"
  variable R1::Real[3, 3] if frame_r_in != frame_r_out
  variable r_out::Real[3] if frame_r_in != frame_r_out
relations
  frame_a.f = [0, 0, 0]
  frame_a.tau = [0, 0, 0]
  if case(frame_r_in, ResolveInFrame.FrameResolve) or case(frame_r_out, ResolveInFrame.FrameResolve)
    frame_resolve.f = [0, 0, 0]
    frame_resolve.tau = [0, 0, 0]
  end
  if frame_r_in == frame_r_out
    r_out_x = r_in_x
    r_out_y = r_in_y
    r_out_z = r_in_z
  else
    r_in = [r_in_x, r_in_y, r_in_z]
    switch frame_r_in
      case World
        R1 = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
      case FrameA
        R1 = frame_a.R
      case FrameResolve
        R1 = frame_resolve.R
    end
    switch frame_r_out
      case World
        r_out = resolve1(R1, r_in)
      case FrameA
        r_out = resolve_relative(r_in, R1, frame_a.R)
      case FrameResolve
        r_out = resolve_relative(r_in, R1, frame_resolve.R)
    end
    [r_out_x, r_out_y, r_out_z] = r_out
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/OneFrameSensor.svg"},
    "labels": [{"label": "transform abs", "x": 500, "y": 680, "rot": 0}]
  }
}
end
```

```dyad
"""
Rotates a pure-rotation 3-vector (e.g. a force, velocity, or angular velocity;
never a position) between frames via a two-step rotation through the world
frame: `frame_r_in -> world -> frame_r_out`.

`frame_a` supplies only an orientation (`frame_a.R`); its position is never
used, so this component is quantity-agnostic -- it works identically for any
3-vector that transforms as a pure rotation.
"""
component TransformAbsoluteVector
  frame_a = Frame3D() {
    "Dyad": {"placement": {"diagram": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050}}}
  }
  frame_resolve = Frame3D() if case(frame_r_in, ResolveInFrame.FrameResolve) or case(frame_r_out, ResolveInFrame.FrameResolve) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  r_in_x = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -40, "y1": 140, "x2": 60, "y2": 240, "rot": 0}
      },
      "tags": []
    }
  }
  r_in_y = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -40, "y1": 450, "x2": 60, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  r_in_z = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -40, "y1": 760, "x2": 60, "y2": 860, "rot": 0}
      },
      "tags": []
    }
  }
  r_out_x = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 140, "x2": 1060, "y2": 240, "rot": 0}
      },
      "tags": []
    }
  }
  r_out_y = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  r_out_z = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 760, "x2": 1060, "y2": 860, "rot": 0}
      },
      "tags": []
    }
  }
  "Frame in which r_in is resolved"
  structural parameter frame_r_in::ResolveInFrame = ResolveInFrame.FrameA()
  "Frame in which r_out is resolved"
  structural parameter frame_r_out::ResolveInFrame = ResolveInFrame.FrameA()
  variable r_in::Real[3] if frame_r_in != frame_r_out
  "Rotation matrix from world into frame_r_in"
  variable R1::Real[3, 3] if frame_r_in != frame_r_out
  variable r_out::Real[3] if frame_r_in != frame_r_out
relations
  frame_a.f = [0, 0, 0]
  frame_a.tau = [0, 0, 0]
  if case(frame_r_in, ResolveInFrame.FrameResolve) or case(frame_r_out, ResolveInFrame.FrameResolve)
    frame_resolve.f = [0, 0, 0]
    frame_resolve.tau = [0, 0, 0]
  end
  if frame_r_in == frame_r_out
    r_out_x = r_in_x
    r_out_y = r_in_y
    r_out_z = r_in_z
  else
    r_in = [r_in_x, r_in_y, r_in_z]
    switch frame_r_in
      case World
        R1 = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
      case FrameA
        R1 = frame_a.R
      case FrameResolve
        R1 = frame_resolve.R
    end
    switch frame_r_out
      case World
        r_out = resolve1(R1, r_in)
      case FrameA
        r_out = resolve_relative(r_in, R1, frame_a.R)
      case FrameResolve
        r_out = resolve_relative(r_in, R1, frame_resolve.R)
    end
    [r_out_x, r_out_y, r_out_z] = r_out
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/OneFrameSensor.svg"},
    "labels": [{"label": "transform abs", "x": 500, "y": 680, "rot": 0}]
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
