---
url: /dyad/stable/stdlib/MultibodyComponents/components/TexturedPlaneVisualizer.md
description: >-
  Dyad TexturedPlaneVisualizer docs.  Frame-connected textured rectangle
  visualizer with no mass or inertia.
---

# `TexturedPlaneVisualizer` {#TexturedPlaneVisualizer}

Frame-connected textured rectangle visualizer with no mass or inertia.

Renders a flat rectangle textured with an image file (JPG/PNG/...). The image is loaded by `FileIO.load` at render time and wrapped in a repeat-mode sampler, so values of `tile > 1` cause the texture to tile. The plane sits in the `length_direction × width_direction` plane of `frame_a`, centered on `r_shape`, with extent `length × width`. A `texturefile` of `""` disables rendering. Useful as a ground / floor or wall decor without introducing dynamics — attach `frame_a` to `Fixed.frame_b` for static placement.

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

## Usage {#Usage}

`MultibodyComponents.TexturedPlaneVisualizer(render=true, color=[0.5, 0.5, 0.5, 1.0], specular_coefficient=1.5, texturefile="", tile=1)`

## Parameters: {#Parameters:}

|                   Name |                                        Description | Units |        Default value |
| ----------------------:| --------------------------------------------------:| -----:| --------------------:|
|               `render` |                                                    |     – |                 true |
|                `color` |                                                    |     – | \[0.5, 0.5, 0.5, 1.0] |
| `specular_coefficient` |                                                    |     – |                  1.5 |
|          `texturefile` |     Path to texture image file (empty = no render) |     – |                   "" |
|                 `tile` | How many times to tile the texture along each axis |     – |                    1 |

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

## Variables {#Variables}

|               Name |                                                           Description | Units |
| ------------------:| ---------------------------------------------------------------------:| -----:|
|           `length` |                            Length of the plane along length_direction |     – |
|            `width` |                              Width of the plane along width_direction |     – |
| `length_direction` |                    Direction of the plane length, resolved in frame_a |     – |
|  `width_direction` |                     Direction of the plane width, resolved in frame_a |     – |
|          `r_shape` | Position of the plane center relative to frame_a, resolved in frame_a |     – |

## Behavior {#Behavior}

$$ \begin{align}
\mathtt{length}\left( t \right) &= 1 \\
\mathtt{width}\left( t \right) &= 1 \\
\mathtt{length_direction}\_{1}\left( t \right) &= 1 \\
\mathtt{length_direction}\_{2}\left( t \right) &= 0 \\
\mathtt{length_direction}\_{3}\left( t \right) &= 0 \\
\mathtt{width_direction}\_{1}\left( t \right) &= 0 \\
\mathtt{width_direction}\_{2}\left( t \right) &= 0 \\
\mathtt{width_direction}\_{3}\left( t \right) &= 1 \\
\mathtt{r_shape}\_{1}\left( t \right) &= 0 \\
\mathtt{r_shape}\_{2}\left( t \right) &= 0 \\
\mathtt{r_shape}\_{3}\left( t \right) &= 0 \\
\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
\end{align}
$$

## Source {#Source}

```dyad
"""
Frame-connected textured rectangle visualizer with no mass or inertia.

Renders a flat rectangle textured with an image file (JPG/PNG/...). The
image is loaded by `FileIO.load` at render time and wrapped in a
repeat-mode sampler, so values of `tile > 1` cause the texture to tile.
The plane sits in the `length_direction × width_direction` plane of
`frame_a`, centered on `r_shape`, with extent `length × width`.
A `texturefile` of `""` disables rendering. Useful as a ground / floor
or wall decor without introducing dynamics — attach `frame_a` to
`Fixed.frame_b` for static placement.
"""
component TexturedPlaneVisualizer
  extends Renderable
  frame_a = Frame3D() {
    "Dyad": {"placement": {"diagram": {"x1": 50, "x2": 150, "y1": 450, "y2": 550}}}
  }
  "Path to texture image file (empty = no render)"
  parameter texturefile::String = ""
  "How many times to tile the texture along each axis"
  parameter tile::Real = 1
  "Length of the plane along length_direction"
  variable length::Real = 1
  "Width of the plane along width_direction"
  variable width::Real = 1
  "Direction of the plane length, resolved in frame_a"
  variable length_direction::Real[3] = [1.0, 0, 0]
  "Direction of the plane width, resolved in frame_a"
  variable width_direction::Real[3] = [0, 0, 1.0]
  "Position of the plane center relative to frame_a, resolved in frame_a"
  variable r_shape::Real[3] = [0, 0, 0]
relations
  frame_a.f = [0, 0, 0]
  frame_a.tau = [0, 0, 0]
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TexturedPlaneVisualizer.svg"},
    "labels": [
      {
        "label": "a",
        "x": 110,
        "y": 470,
        "rot": 0,
        "layer": "icon",
        "attrs": {
          "fill": "#333",
          "font-size": "80",
          "font-weight": "bold",
          "text-anchor": "middle",
          "dominant-baseline": "central"
        }
      }
    ]
  }
}
end
```

```dyad
"""
Frame-connected textured rectangle visualizer with no mass or inertia.

Renders a flat rectangle textured with an image file (JPG/PNG/...). The
image is loaded by `FileIO.load` at render time and wrapped in a
repeat-mode sampler, so values of `tile > 1` cause the texture to tile.
The plane sits in the `length_direction × width_direction` plane of
`frame_a`, centered on `r_shape`, with extent `length × width`.
A `texturefile` of `""` disables rendering. Useful as a ground / floor
or wall decor without introducing dynamics — attach `frame_a` to
`Fixed.frame_b` for static placement.
"""
component TexturedPlaneVisualizer
  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": {"x1": 50, "x2": 150, "y1": 450, "y2": 550}}}
  }
  "Path to texture image file (empty = no render)"
  parameter texturefile::String = ""
  "How many times to tile the texture along each axis"
  parameter tile::Real = 1
  "Length of the plane along length_direction"
  variable length::Real = 1
  "Width of the plane along width_direction"
  variable width::Real = 1
  "Direction of the plane length, resolved in frame_a"
  variable length_direction::Real[3] = [1.0, 0, 0]
  "Direction of the plane width, resolved in frame_a"
  variable width_direction::Real[3] = [0, 0, 1.0]
  "Position of the plane center relative to frame_a, resolved in frame_a"
  variable r_shape::Real[3] = [0, 0, 0]
relations
  frame_a.f = [0, 0, 0]
  frame_a.tau = [0, 0, 0]
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TexturedPlaneVisualizer.svg"},
    "labels": [
      {
        "label": "a",
        "x": 110,
        "y": 470,
        "rot": 0,
        "layer": "icon",
        "attrs": {
          "fill": "#333",
          "font-size": "80",
          "font-weight": "bold",
          "text-anchor": "middle",
          "dominant-baseline": "central"
        }
      }
    ]
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
