Lines

Visualizing a set of lines as cylinders with variable size, e.g., used to display characters (no Frame connector)

    Lines

Library

Modelica/Mechanics/MultiBody/Visualizers/Internal

Description

With model Lines a set of dynamic lines is definedthat are located relatively to frame_a. Every lineis represented by a cylinder. This allows, e.g., to define simple shaped3-dimensional characters. Note, if the lines are fixed relatively to frame_a,it is more convenient to use model Visualizers.FixedLines.An example for dynamic lines is shown in the following figure:
 

model Visualizers.FixedLines

 
The two letters "x" and "y" are constructed with 4 linesby providing the following data for input variable lines

   lines = {[0, 0; 1, 1],[0, 1; 1, 0],[1.5, -0.5; 2.5, 1],[1.5, 1; 2, 0.25]}

Via vectors n_x and n_y a two-dimensionalcoordinate system is defined. The points defined with variablelines are with respect to this coordinate system. For example"[0, 0; 1, 1]" defines a line that starts at {0,0} and ends at {1,1}.The diameter and color of all line cylinders are identicaland are defined by parameters.

Parameters

Lines_0

NameLabelDescriptionData TypeValid Values

mo_R

R

Orientation object to rotate the world frame into the object frame

FromModelica('Modelica.Mechanics.MultiBody.Frames.Orientation')

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_lines

r_lines

Position vector from origin of object frame to the origin of 'lines' frame, resolved in object frame

Vector of size 3

mo_n_x

n_x

Vector in direction of x-axis of 'lines' frame, resolved in object frame

Vector of size 3

mo_n_y

n_y

Vector in direction of y-axis of 'lines' frame, resolved in object frame

Vector of size 3

mo_lines

lines

List of start and end points of cylinders resolved in an x-y frame defined by n_x, n_y, e.g., {[0,0;1,1], [0,1;1,0], [2,0; 3,1]}

Matrix

mo_diameter

diameter

Diameter of the cylinders defined by lines

Scalar

mo_color

color

Color of cylinders

Vector of size 3

mo_specularCoefficient

specularCoefficient

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

Scalar

mo_n

n

Number of cylinders

Scalar

Lines_1

NameLabelDescriptionData TypeValid 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

'R_rel'
'R_lines'
'r_abs'

mo__modifiers/attribute

Attribute

Cell of strings

'start'
'fixed'

mo__modifiers/value

Value