CoordinateSystem
Visualizing an orthogonal coordinate system of three axes
Library
PlanarMechanics/Visualizers/Internal
Description
Note: This element is intended to be used inPlanarWorld and its derivatives only!To visualize a coordinate system in your model, the best solution is usually to usethe visualizer Advanced.CoordinateSystem.The only difference between this two visualizers is that the current one doesnot utilizes outer planarWorld, whereas the other does.
This element enbles visualization of an orthogonal coordinate systemas shown in the following picture.

The variables r
, R
and r_shape
are declared as (time varying) input variables.If the default equation is not appropriate, a correspondingmodifier equation has to be provided in themodel where a CoordinateSystem instance is used, e.g., in the form
PlanarMechanics.Visualizers.Advanced.CoordinateSystem coordinateSystem(r = {sin(time), 0, 0.3});
Color of each axis can be set individually using a RGBcolor space given in the range 0 .. 255.Predefined colors fromTypes.Defaultsare used throughout the library to get a coherent visualization.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_r | r | Position vector from origin of world frame to origin of object frame, resolved in world frame | Vector of size 3 | |
mo_R | R | Orientation object to rotate the world frame into the object frame | FromModelica('Modelica.Mechanics.MultiBody.Frames.Orientation') | |
mo_r_shape | r_shape | Position vector from origin of object frame to shape origin, resolved in object frame | Vector of size 3 | |
mo_axisLength | axisLength | Length of world axes arrows | Scalar | |
mo_axisDiameter | axisDiameter | Diameter of world axes arrows | Scalar | |
mo_color_x | color_x | Color of x-arrow | Vector of size 3 | |
mo_color_y | color_y | Color of y-arrow | Vector of size 3 | |
mo_color_z | color_z | Color of z-arrow | Vector of size 3 | |
mo_axisShowLabels | axisShowLabels | True, if labels shall be shown | Scalar | true |
mo_labelStart | labelStart | Scalar | ||
mo_scaledLabel | scaledLabel | Scalar |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo__nmodifiers | Number of Modifiers | Specifies the number of modifiers | Number | |
mo__modifiers | Modifiers | Add new modifier | Structure | |
mo__modifiers/varname | Variable name | Cell of strings | ||
mo__modifiers/attribute | Attribute | Cell of strings | 'start' | |
mo__modifiers/value | Value |