---
url: /dyad/dev/stdlib/MultibodyComponents/examples/tests.SphericalPendulum.md
description: >-
  Dyad tests.SphericalPendulum docs.  A pendulum using a Spherical joint. The
  spherical joint connects the world frame to a bar with a body at the end,
  creating a three-degree-of...
---

# `tests.SphericalPendulum` {#tests.SphericalPendulum}

# Spherical Pendulum {#Spherical-Pendulum}

A pendulum using a Spherical joint. The spherical joint connects the world frame to a bar with a body at the end, creating a three-degree-of-freedom pendulum.

## Usage {#Usage}

`MultibodyComponents.tests.SphericalPendulum()`

## Behavior {#Behavior}

## Source {#Source}

```dyad
"""
# Spherical Pendulum

A pendulum using a Spherical joint.
The spherical joint connects the world frame to a bar with a body at the end,
creating a three-degree-of-freedom pendulum.
"""
example component SphericalPendulum
  world = MultibodyComponents.World() {}
  joint = MultibodyComponents.Spherical(orientation_state = OrientationState.Euler()) {}
  bar = MultibodyComponents.FixedTranslation(r = [0, -1, 0]) {}
  body = MultibodyComponents.Body(m = 1) {}
relations
  connect(world.frame_b, joint.frame_a) {}
  connect(joint.frame_b, bar.frame_a) {}
  connect(bar.frame_b, body.frame_a) {}
end
```

```dyad
"""
# Spherical Pendulum

A pendulum using a Spherical joint.
The spherical joint connects the world frame to a bar with a body at the end,
creating a three-degree-of-freedom pendulum.
"""
example component SphericalPendulum
  world = MultibodyComponents.World() {}
  joint = MultibodyComponents.Spherical(orientation_state = OrientationState.Euler()) {}
  bar = MultibodyComponents.FixedTranslation(r = [0, -1, 0]) {}
  body = MultibodyComponents.Body(m = 1) {}
relations
  connect(world.frame_b, joint.frame_a) {}
  connect(joint.frame_b, bar.frame_a) {}
  connect(bar.frame_b, body.frame_a) {}
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
