---
url: /dyad/stable/stdlib/MultibodyComponents/components/FixedTranslation.md
description: Dyad FixedTranslation docs.  Fixed translation between two frames.
---

# `FixedTranslation` {#FixedTranslation}

Fixed translation between two frames.

`frame_b` is displaced from `frame_a` by vector `r` resolved in `frame_a`. Orientation is rigidly transferred, forces and torques are balanced (with the lever arm cross product for torques).

This component extends from [`Renderable`](../types/Renderable.md)

## Usage {#Usage}

`MultibodyComponents.FixedTranslation(render=true, color=world_default_rod_color(), specular_coefficient=1.5, r=[0, 0, 0], radius=norm(r) / world_default_width_fraction(), r_length=norm(r), r_dir=r / max(r_length, 1e-10))`

## Parameters: {#Parameters:}

|                   Name |                                                  Description | Units |             Default value |
| ----------------------:| ------------------------------------------------------------:| -----:| -------------------------:|
|               `render` |                                                              |     – |                      true |
|                `color` |                                                              |     – | world_default_rod_color() |
| `specular_coefficient` |                                                              |     – |                       1.5 |
|                    `r` | position vector from frame_a to frame_b, resolved in frame_a |     m |                 \[0, 0, 0] |
|               `radius` |                             Radius of the body in animations |     – | norm(r) / w...\_fraction() |

## 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_b` - 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))

## Behavior {#Behavior}

## Source {#Source}

```dyad
"""
Fixed translation between two frames.

`frame_b` is displaced from `frame_a` by vector `r` resolved in `frame_a`.
Orientation is rigidly transferred, forces and torques are balanced
(with the lever arm cross product for torques).
"""
component FixedTranslation
  extends Renderable(color = world_default_rod_color())
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 50, "y1": 450, "x2": 150, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 850, "y1": 450, "x2": 950, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  # Visualization shape
  shape = CylinderShape(render = render, color = color, r = frame_a.r_0, R = transpose(frame_a.R), length_direction = r_dir, length = r_length, width = 2 * radius, height = 2 * radius)
  "position vector from frame_a to frame_b, resolved in frame_a"
  parameter r::Length[3] = [0, 0, 0]
  "Radius of the body in animations"
  parameter radius::Real = norm(r) / world_default_width_fraction()
  final parameter r_length::Real = norm(r)
  final parameter r_dir::Real[3] = r / max(r_length, 1e-10)
relations
  # Position: frame_b displaced from frame_a by r resolved to world
  frame_b.r_0 = frame_a.r_0 + resolve1(frame_a.R, r)
  # Orientation rigidly transferred
  frame_b.R = frame_a.R
  # Force balance
  frame_a.f + frame_b.f = [0, 0, 0]
  # Torque balance (with lever arm)
  frame_a.tau + frame_b.tau + cross(r, frame_b.f) = [0, 0, 0]
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/FixedTranslation.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 280,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
```

```dyad
"""
Fixed translation between two frames.

`frame_b` is displaced from `frame_a` by vector `r` resolved in `frame_a`.
Orientation is rigidly transferred, forces and torques are balanced
(with the lever arm cross product for torques).
"""
component FixedTranslation
  parameter render::Boolean = true
  parameter color::Real[4] = [0.5, 0.5, 0.5, 1.0]
  parameter specular_coefficient::Real = 1.5
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 50, "y1": 450, "x2": 150, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 850, "y1": 450, "x2": 950, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  # Visualization shape
  shape = CylinderShape(render = render, color = color, r = frame_a.r_0, R = transpose(frame_a.R), length_direction = r_dir, length = r_length, width = 2 * radius, height = 2 * radius)
  "position vector from frame_a to frame_b, resolved in frame_a"
  parameter r::Length[3] = [0, 0, 0]
  "Radius of the body in animations"
  parameter radius::Real = norm(r) / world_default_width_fraction()
  final parameter r_length::Real = norm(r)
  final parameter r_dir::Real[3] = r / max(r_length, 1e-10)
relations
  # Position: frame_b displaced from frame_a by r resolved to world
  frame_b.r_0 = frame_a.r_0 + resolve1(frame_a.R, r)
  # Orientation rigidly transferred
  frame_b.R = frame_a.R
  # Force balance
  frame_a.f + frame_b.f = [0, 0, 0]
  # Torque balance (with lever arm)
  frame_a.tau + frame_b.tau + cross(r, frame_b.f) = [0, 0, 0]
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/FixedTranslation.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 280,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`CentrifugalTest`](FixedTranslation.md)

  * [`CutForceTest`](FixedTranslation.md)

  * [`CutTorqueTest`](FixedTranslation.md)

  * [`OneDOFSlippingWheelSegwayTest`](FixedTranslation.md)

  * [`PlanarToMultiBodyPendulumTest`](FixedTranslation.md)

  * [`RelativeForceTest`](FixedTranslation.md)

  * [`WorldForceTest`](FixedTranslation.md)
