WOLFRAM SYSTEM MODELER

Vector

Visualizing a vector quantity (force, torque, etc.)

Wolfram Language

In[1]:=
SystemModel["Modelica.Mechanics.MultiBody.Visualizers.Advanced.Vector"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Model Vector defines a vector that is dynamically visualized at the defined location (see variables below). The vector length does not represent a physical length, but a different 3-dimensional quantity (such as force, torque, speed, …), except for RelativePosition. That allows the vectors of similar quantities to be scaled appropriately during post-processing. This is useful, even for RelativePosition and in that case to disable or exaggerate the relative positions.

The dialog variables R, r, coordinates, color, specularCoefficient, quantity, headAtOrigin, and twoHeadedArrow are declared as (time varying) input variables. If the default equation is not appropriate, a corresponding modifier equation has to be provided in the model where a Vector instance is used, e.g., in the form

Visualizers.Advanced.Vector vectorForce(coordinates = {sin(time),cos(time),0});

Variable color is an Integer vector with 3 elements, {r, g, b}, and specifies the color of the shape. {r, g, b} are the "red", "green" and "blue" color parts. Note, r, g and b are given in the range 0 … 255. The predefined type MultiBody.Types.Color contains a menu definition of the colors used in the MultiBody library together with a color editor.

Parameters (1)

quantity

Value: Types.VectorQuantity.Force

Type: VectorQuantity

Description: Quantity of the coordinates

Inputs (7)

R

Default Value: Frames.nullRotation()

Type: Orientation

Description: Orientation object to rotate the world frame into the vector frame

r

Default Value: {0, 0, 0}

Type: Position[3] (m)

Description: Position vector from origin of world frame to origin of vector frame, resolved in world frame

coordinates

Default Value: {0, 0, 0}

Type: Real[3]

Description: Coordinates of the vector resolved in vector frame

color

Default Value: Types.Defaults.ArrowColor

Type: Color

Description: Color of vector

specularCoefficient

Default Value: 0.7

Type: SpecularCoefficient

Description: Material property describing the reflecting of ambient light (= 0 means, that light is completely absorbed)

headAtOrigin

Default Value: false

Type: Boolean

Description: = true, if the vector is pointing towards the origin of vector frame

twoHeadedArrow

Default Value: false

Type: Boolean

Description: = true, if the arrow has two heads after each other (pointing in the same direction)

Outputs (10)

Form

Type: Real

rxvisobj

Type: Real[3]

Description: x-axis unit vector of shape, resolved in world frame

ryvisobj

Type: Real[3]

Description: y-axis unit vector of shape, resolved in world frame

rvisobj

Type: Position[3] (m)

Description: position vector from world frame to shape frame, resolved in world frame

vectorCoordinates

Type: Real[3]

vectorColor

Type: Color

Description: RGB representation of color

vectorSpecularCoefficient

Type: SpecularCoefficient

Description: Reflection of ambient light (= 0: light is completely absorbed)

vectorQuantity

Type: VectorQuantity

Description: Enumeration defining the kind of physical quantity represented by the vector

vectorTwoHeadedArrow

Type: Boolean

vectorHeadAtOrigin

Type: Boolean

Components (1)

R

Type: Orientation

Description: Orientation object to rotate the world frame into the vector frame

Used in Components (3)

FixedArrow

Modelica.Mechanics.MultiBody.Visualizers

Visualizing an arrow with dynamically varying size in frame_a

Arrow

Modelica.Mechanics.MultiBody.Visualizers.Advanced

Visualizing an arrow with variable size

DoubleArrow

Modelica.Mechanics.MultiBody.Visualizers.Advanced

Visualizing a double arrow with variable size