modelFixedLines

Visualizing a set of lines as cylinders (e.g., used to display characters)

Extends from Modelica.Mechanics.MultiBody.Interfaces.PartialVisualizer (Base model for visualizers (has a frame_a on the left side + outer world + assert to guarantee that the component is connected)).

Information

With model FixedLines a set of lines is defined that are located relatively to frame_a. Every line is represented by a cylinder. This allows to define simple shaped 3-dimensional characters. An example is shown in the following figure:
 

model Visualizers.Internal.FixedLines

 
The two letters "x" and "y" are constructed with 4 lines by providing the following data for parameter lines

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

Via parameter vectors n_x and n_y a two-dimensional coordinate system is defined. The points defined with parameter lines 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 identical.

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled

Connectors

TypeNameDefaultDescription
Interfaces.Frame_aframe_a (from PartialVisualizer)Coordinate system in which visualization data is resolved

Components

TypeNameDefaultDescription
Realscale1The 'lines' are visualized 'scale' times bigger
SI.Position[:,2,2]lines{[0, 0; 1, 1], [0, 1; 1, 0]}List of start and end points of cylinders resolved along n_x and n_y
SI.Distancediameter0.05Diameter of the cylinders defined by lines
SI.Position[3]r_lines{0, 0, 0}Position vector from origin of frame_a to the origin of the 'lines' frame, resolved in frame_a
Real[3]n_x{1, 0, 0}Vector in direction of x-axis of 'lines' frame, resolved in frame_a.
Real[3]n_y{0, 1, 0}Vector in direction of y-axis of 'lines' frame, resolved in frame_a.
MultiBody.Types.Colorcolor{0, 128, 255}Color of cylinders
Types.SpecularCoefficientspecularCoefficientworld.defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)