---
url: /dyad/stable/stdlib/MultibodyComponents/examples/PlanarMechanics.examples.PendulumTest.md
description: Dyad PlanarMechanics.examples.PendulumTest docs.  A free swinging pendulum.
---

# `PlanarMechanics.examples.PendulumTest` {#PlanarMechanics.examples.PendulumTest}

A free swinging pendulum.

## Usage {#Usage}

`MultibodyComponents.PlanarMechanics.examples.PendulumTest()`

## Behavior {#Behavior}

## Source {#Source}

```dyad
"A free swinging pendulum."
example component PendulumTest
  world = MultibodyComponents.PlanarMechanics.World(render_ground = true) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 30, "y1": 240, "x2": 230, "y2": 440, "rot": 0}
      },
      "tags": []
    }
  }
  revolute = MultibodyComponents.PlanarMechanics.Revolute(phi(initial = 0.0), w(initial = 0.0)) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 290, "y1": 240, "x2": 490, "y2": 440, "rot": 0}
      },
      "tags": []
    }
  }
  rod = MultibodyComponents.PlanarMechanics.FixedTranslation(r = [1.0, 0.0]) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 550, "y1": 240, "x2": 750, "y2": 440, "rot": 0}
      },
      "tags": []
    }
  }
  body = MultibodyComponents.PlanarMechanics.Body(m = 1.0, I = 0.1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 810, "y1": 240, "x2": 1010, "y2": 440, "rot": 0}
      },
      "tags": []
    }
  }
relations
  connect(world.frame_b, revolute.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
  connect(revolute.frame_b, rod.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
  connect(rod.frame_b, body.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {"Dyad": {"tests": {"case1": {"stop": 3}}}}
end
```

```dyad
"A free swinging pendulum."
example component PendulumTest
  world = MultibodyComponents.PlanarMechanics.World(render_ground = true) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 30, "y1": 240, "x2": 230, "y2": 440, "rot": 0}
      },
      "tags": []
    }
  }
  revolute = MultibodyComponents.PlanarMechanics.Revolute(phi(initial = 0.0), w(initial = 0.0)) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 290, "y1": 240, "x2": 490, "y2": 440, "rot": 0}
      },
      "tags": []
    }
  }
  rod = MultibodyComponents.PlanarMechanics.FixedTranslation(r = [1.0, 0.0]) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 550, "y1": 240, "x2": 750, "y2": 440, "rot": 0}
      },
      "tags": []
    }
  }
  body = MultibodyComponents.PlanarMechanics.Body(m = 1.0, I = 0.1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 810, "y1": 240, "x2": 1010, "y2": 440, "rot": 0}
      },
      "tags": []
    }
  }
relations
  connect(world.frame_b, revolute.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
  connect(revolute.frame_b, rod.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
  connect(rod.frame_b, body.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {"Dyad": {"tests": {"case1": {"stop": 3}}}}
end
```

## Test Cases {#Test-Cases}

### Test Case `case1` {#Test-Case-case1}

## Related {#Related}

* Examples

* Experiments

* Analyses
