---
url: /dyad/stable/stdlib/MultibodyComponents/tests/PlanarMechanics.PrescribedPositionTest.md
description: >-
  Dyad PlanarMechanics.PrescribedPositionTest docs.  A body whose frame_a is
  driven by a PrescribedPosition component with time-varying position inputs.
  Position should match [sin(t), 2t].
---

# `PlanarMechanics.PrescribedPositionTest` {#PlanarMechanics.PrescribedPositionTest}

A body whose `frame_a` is driven by a `PrescribedPosition` component with time-varying position inputs. Position should match `[sin(t), 2t]`.

## Usage {#Usage}

`MultibodyComponents.PlanarMechanics.PrescribedPositionTest()`

## Behavior {#Behavior}

## Source {#Source}

```dyad
"""
A body whose `frame_a` is driven by a `PrescribedPosition` component with
time-varying position inputs. Position should match `[sin(t), 2t]`.
"""
test component PrescribedPositionTest
  world = World() {}
  prescribed = PrescribedPosition() {}
  body = Body(m = 1, I = 1) {}
relations
  prescribed.r_x = sin(time)
  prescribed.r_y = 2 * time
  connect(prescribed.frame_b, body.frame_a) {}
end
```

```dyad
"""
A body whose `frame_a` is driven by a `PrescribedPosition` component with
time-varying position inputs. Position should match `[sin(t), 2t]`.
"""
test component PrescribedPositionTest
  world = World() {}
  prescribed = PrescribedPosition() {}
  body = Body(m = 1, I = 1) {}
relations
  prescribed.r_x = sin(time)
  prescribed.r_y = 2 * time
  connect(prescribed.frame_b, body.frame_a) {}
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`Body`](PlanarMechanics.PrescribedPositionTest.md)

  * [`PrescribedPosition`](PlanarMechanics.PrescribedPositionTest.md)

  * [`World`](PlanarMechanics.PrescribedPositionTest.md)
