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
Usage
MultibodyComponents.TexturedPlaneVisualizer(render=true, color=[0.5, 0.5, 0.5, 1.0], specular_coefficient=1.5, texturefile="", tile=1)
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
frame_a- Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or severalFrame
connectors that can be connected together (Frame3D)
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
Dict{MIME{Symbol("text/plain")}, String} with 1 entry: MIME type text/plain => "Error displaying result"
Source
"""
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() {}
"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"
}
}
]
}
}
endFlattened Source
"""
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() {}
"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"
}
}
]
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses