Interactive.ViewElements.Drawables

Drawable elements

Information

Drawables package

Drawables package contains visual elements for building animated schematic representations of the system.

These elements include some basic geometric shapes such as sphere, arrow, cone, cylinder, half pipe, cube, regular polygon and plane. The geometric and visual properties of these objects (e.g., spatial position, rotation, size, texture and color) can be linked to the model variables, changing during the simulation according to the time-evolution of these variables.

Objects of Drawables classes must be placed inside containers that provide a coordinate system (i.e., containers of DrawingPanel and PlottingPanel classes).

        

Package Content

Name Description
Interactive.ViewElements.Drawables.PlanarGrid PlanarGrid Draws a polygon
Interactive.ViewElements.Drawables.Sphere Sphere Draws an oval
Interactive.ViewElements.Drawables.Text Text Displays a string
Interactive.ViewElements.Drawables.Arrow Arrow Draws an arrow
Interactive.ViewElements.Drawables.Cone Cone  
Interactive.ViewElements.Drawables.Cylinder Cylinder  
Interactive.ViewElements.Drawables.HalfPipe HalfPipe  
Interactive.ViewElements.Drawables.ScalarBar ScalarBar  
Interactive.ViewElements.Drawables.Cube Cube  
Interactive.ViewElements.Drawables.Trail Trail  
Interactive.ViewElements.Drawables.RegularPolygon RegularPolygon  
Interactive.ViewElements.Drawables.Disk Disk  
Interactive.ViewElements.Drawables.File3DSImporter File3DSImporter  
Interactive.ViewElements.Drawables.Plane Plane  
Interactive.ViewElements.Drawables.Polygon Polygon  
Interactive.ViewElements.Drawables.TextReal TextReal Displays a string + real number
Interactive.ViewElements.Drawables.TrailNPoints TrailNPoints  
Interactive.ViewElements.Drawables.Line Line  

Interactive.ViewElements.Drawables.PlanarGrid Interactive.ViewElements.Drawables.PlanarGrid

Draws a polygon

Information

Objects of the PlanarGrid class represent 3D regular structures, with variable spacing in the three coordinate directions x-y-z. The structure in defined by specifying the length and the number of cells in each direction. Additionally, each cell can contain data attributes (scalars, tensors and vectors) that can be used for visualization. For instance, scalar fields can be represented using colors, vectorial fields using vectors, etc.

Extends from Interactive.src.ViewElements.Drawables.PlanarGrid (Planar grid de size LengthX*LengthY*LengthZ with nCells. Var. linked to the model: color[nCells], Position[3], Origin[3], Degrees[3], LengthX, LengthY, LengthZ, scalars[nCells], posGrid[3]).

Parameters

NameDescription
intColorintColor = 1 ==> colors change in time
intPosintPos = 1 ==> the center and axes change in time
posVectorInCell[3]Determines the vector origin inside the cell. The cell center is (0.5, 0.5, 0.5) The cell bottom left corner is (0, 0, 0) The cell upper right corner is (px, py, pz) = (1, 1, 1)
dims[3]Number of cells in x, y and z
minHueRangeCellLUTSet the minimum range in hue
maxHueRangeCellLUTSet the maximum range in hue
minSatRangeCellLUTSet the minimum range in hue
maxSatRangeCellLUTSet the maximum range in hue
minValueRangeCellLUTSet the minimum range in hue
maxValueRangeCellLUTSet the maximum range in hue
minAlphaRangeCellLUTSet the minimum range in hue
maxAlphaRangeCellLUTSet the maximum range in hue
minRangeCellLUTSet the minimum range of values mapped
maxRangeCellLUTSet the maximum range of values mapped
linearScaleCellLUT1/0: linear/log10 scale of values
linearCellLUT1/0: the values are mapped into colors using a linear ramp/S-curve
displayVectors1/0: enable/disable the vector display
minHueRangeVectorLUTSet the minimum range in hue
maxHueRangeVectorLUTSet the maximum range in hue
minSatRangeVectorLUTSet the minimum range in hue
maxSatRangeVectorLUTSet the maximum range in hue
minValueRangeVectorLUTSet the minimum range in hue
maxValueRangeVectorLUTSet the maximum range in hue
minAlphaRangeVectorLUTSet the minimum range in hue
maxAlphaRangeVectorLUTSet the maximum range in hue
minRangeVectorLUTSet the minimum range of values mapped
maxRangeVectorLUTSet the maximum range of values mapped
linearScaleVectorLUT1/0: linear/log10 scale of values
linearVectorLUT1/0: the values are mapped into colors using a linear ramp/S-curve

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Sphere Interactive.ViewElements.Drawables.Sphere

Draws an oval

Information

Sphere class draws a sphere.The position of the sphere center (Position[:] variable), the point about which rotation take place (Origin[:] variable), the rotation degrees in axes x, y and z (Degrees[:] variable) and its radius (Radius[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.Sphere (Sphere. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3] and Radius).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
thetaResolutionNumber of points in the longitude direction (ranging from startTheta to endTheta)
startThetaStarting longitude angle
endThetaEnding longitude angle
phiResolutionNumber of points in the latitude direction (ranging from startPhi to endPhi)
startPhiStarting latitude angle
endPhiEnding latitude angle
tessellationCause the sphere to be tessellated with edges along the latitude and longitude lines. If off, triangles are generated at non-polar regions, which results in edges that are not parallel to latitude and longitude lines. // Real colors[numIntColor + 1]; // Real vert[numInt + 1]; If on, quadrilaterals are generated everywhere except at the poles. This can be useful for generating a wireframe sphere with natural latitude and longitude lines

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Text Interactive.ViewElements.Drawables.Text

Displays a string

Information

Text class displays a string. The position of the string center (Position[:] variable), the point about which rotation take place (Origin[:] variable) and the rotation degrees in axes x, y and z (Degrees[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.Text (Displays a string. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3].).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
scale 
intPosintPos = 1 ==> the center and axes change in time
textText displayed by the component

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Arrow Interactive.ViewElements.Drawables.Arrow

Draws an arrow

Information

Arrow class displays a vector. The position of its center (Position[:] variable), the point about which rotation take place (Origin[:] variable), the rotation degrees in axes x, y and z (Degrees[:] variable) and the arrow scale factor (scale[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.Arrow (Arrow. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3], scale).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
TipResolutionTipResolution = 1 ==> the tip is represented by a triangle
ShaftResolutionSet the resolution of the shaft. 2 gives a rectangle
TipLength 
TipRadius 
ShaftRadius 

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Cone Interactive.ViewElements.Drawables.Cone

Information

Cone class displays a cone. The position of its center (Position[:] variable), the point about which rotation take place (Origin[:] variable), the rotation degrees in axes x, y and z (Degrees[:] variable), its radius (Radius[:] variable) and height (Height[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.Cone (Cone. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3], Radius, Height).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
resolutionNumber of facets used to define cone
capping1/0: Turn on/off whether to cap cone with polygon

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Cylinder Interactive.ViewElements.Drawables.Cylinder

Information

Cyinder class displays a cylinder. The position of its center (Position[:] variable), the point about which rotation take place (Origin[:] variable), the rotation degrees in axes x, y and z (Degrees[:] variable), its radius (Radius[:] variable) and height (Height[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.Cylinder (Cylinder. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3], Radius, Height).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
resolutionNumber of facets used to define cylinder
capping1/0: Turn on/off whether to cap cylinder with polygons
Position0[3]Coordinates of the cylinder center
Origin0[3]Point about which rotations take place
Degrees0[3]rotation degrees in x, y and z (from 0 to 360)
Radius0Cylinder radius
Height0Cylinder height

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.HalfPipe Interactive.ViewElements.Drawables.HalfPipe

Information

HalfPipe class displays the transversal section of a pipe. The position of its center (Position[:] variable), the point about which rotation take place (Origin[:] variable), the rotation degrees in axes x, y and z (Degrees[:] variable), its inner radius (RadiusMin[:] variable), its outer radius (RadiusMax[:] variable) and length (Length[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.HalfPipe (Longitudinal section of a pipe. The length is in the x direction. The radius is in the y direction. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3], RadiusMin, RadiusMax, Length).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
nxNumber of cells in the x dimension
nyNumber of cells in the y dimension
nzNumber of cells in the z dimension

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.ScalarBar Interactive.ViewElements.Drawables.ScalarBar

Information

ScalarBar class generates a legend showing the correspondence between a colorbar and a range of numeric values. The corresponding numeric values are shown above the colorbar. The objects of this class can be easily configured: the virtual-lab developer only has to set the data value range, the color range and the type of mapping between the data and the colors (i.e., linear or logarithm ramp).

Extends from Interactive.src.ViewElements.Drawables.ScalarBar (Scalar bar. Var. linked to the model: none).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
titleTitle displayed by the scalarBar
xX coordinate of the scalarBar left corner in the normalized view-port (i.e., x-y (0,1) )
yY coordinate of the scalarBar left corner in the normalized view-port (i.e., x-y (0,1) )
WidthScalarBar width in the normalized view-port (i.e., x-y (0,1) )
HeightScalarBar height in the normalized view-port (i.e., x-y (0,1) )
nLabelsNumber of labels displayed by the scalarBar
maxNColorsNumber of colors diplayed by the scalarBar
labelFormatformat of the labels displayed by the scalarBar
horizontal1/0: horizontal/vertical orientation of the scalarBar
minHueRangeSet the minimum range in hue
maxHueRangeSet the maximum range in hue
minRangeSet the minimum range of values mapped into the scalarBar
maxRangeSet the maximum range of values mapped into the scalarBar
linearScaleLut1/0: linear/log10 scale of values
linearLut1/0: the values are mapped into colors using a linear ramp/S-curve

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Cube Interactive.ViewElements.Drawables.Cube

Information

Cube class draws a cube. The position of the cube center (Position[:] variable), the point about which rotation take place (Origin[:] variable), the rotation degrees in axes x, y and z (Degrees[:] variable) and its length in axis x, y and z (Length[3] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.Cube (Cube. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3], Length[3]).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Trail Interactive.ViewElements.Drawables.Trail

Information

Creates a drawing element that displays a sequence of points at given coordinates of the hosting container. The point position (point[2] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.Trail (Trail. Var. linked to the model: point[2]).

Parameters

NameDescription
maximumPointsMaximum number of points to be drawn (if 0 all the values are drawn)
nSkipNumber of points to skip before plotting one
lineColorLine color
trailLabel Label of the trail in the plot
sizeSymbolSymbol size
styleSymbolSymbol style
fillingColorSFilling color of the symbol
outlineColorSColor of the symbol outline

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.RegularPolygon Interactive.ViewElements.Drawables.RegularPolygon

Information

RegularPolygon class draws a polygon inscribed in a circle. The position of the center (Position[:] variable), the point about which rotation take place (Origin[:] variable), the rotation degrees in axes x, y and z (Degrees[:] variable), the normal to the polygon surface (Normal[3] variable) and the radius of the circle inscribing the polygon (Radius variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.RegularPolygon (Regular polygon inscribed in a circle. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3], Normal[3], Radius).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
nSidesNumber of sides
polygon1/0: enable/disable the production of a polygon
polyline1/0: enable/disable the production of a polyline

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Disk Interactive.ViewElements.Drawables.Disk

Information

Disk class draws a disk. The position of the cube center (Position[:] variable), the point about which rotation take place (Origin[:] variable), the rotation degrees in axes x, y and z (Degrees[:] variable), its inner radius (RadiusMin[:] variable), its outer radius (RadiusMax[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.Disk (Disk. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3], InnerRadius, OuterRadius).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
RadialResolutionNumber of points in radius direction
CircumferentialResolutionNumber of points in circumferential direction

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.File3DSImporter Interactive.ViewElements.Drawables.File3DSImporter

Information

File3DSImporter class allow inserting objects in 3D Studio format. The position of the object center (Position[:] variable), the point about which rotation take place (Origin[:] variable) and the rotation degrees in axes x, y and z (Degrees[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.File3DSImporter (Imports 3D Studio files. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3]).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
RadialResolutionNumber of points in radius direction
CircumferentialResolutionNumber of points in circumferential direction
file3DSName of the 3DS file
ScaleXscale factor
ScaleY 
ScaleZ 

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Plane Interactive.ViewElements.Drawables.Plane

Information

Plane class draws a plane. The plane is set by specifying 3 points: OriginPoint[3] (i.e., point defining the origin of the plane), Point1[3] (i.e., point defining the first axis of the plane) and Point2[3] (i.e., point defining the second axis of the plane). The position of its center (Position[:] variable), the point about which rotation take place (Origin[:] variable) and the rotation degrees in axes x, y and z (Degrees[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.Plane (Plane. Var. linked to the model: color[11], Position[3], Origin[3], Degrees[3]).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
Resolution[2] 
OriginPoint[3]Specify a point defining the origin of the plane
Point1[3]Specify a point defining the first axis of the plane
Point2[3]Specify a point defining the second axis of the plane

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Polygon Interactive.ViewElements.Drawables.Polygon

Information

Polygon class draws a polygon giving the vertexes coordinates. The position of the vertexes (PosVertexes[:] variable), the polygon's center (Position[:] variable),the point about which rotation take place (Origin[:] variable),the rotation degrees in axes x, y and z (Degrees[:] variable) and the vertexes coordinates (posVertexes[:] variable) can be linked to the model variables.

The number of the polygon's sides, the color of the polygon's area and line are parameter of this class.

Extends from Interactive.src.ViewElements.Drawables.Polygon (Polygon. Var. linked to the model: colors[11], Position[3], Origin[3], Degrees[3]).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
intPosintPos = 1 ==> the center and axes change in time
nSidesNumber of sides
polygon1/0: color or not the polygon
polyline1/0: enable/disable the production of a polyline

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.TextReal Interactive.ViewElements.Drawables.TextReal

Displays a string + real number

Information

Text class displays a string and a numeric value after the string.
The numeric value (var variable), the position of the string center (Position[:] variable), the point about which rotation take place (Origin[:] variable) and the rotation degrees in axes x, y and z (Degrees[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.TextReal (Displays a string + real number. Var. linked to the model: var, colors[11], Position[3], Origin[3], Degrees[3]).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
scale 
intPosintPos = 1 ==> the center and axes change in time
initTextText displayed by the component before the real value
finalTextText displayed by the component after the real value
intValueintValue = 1 ==> the real value displayed by the component changes in time

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.TrailNPoints Interactive.ViewElements.Drawables.TrailNPoints

Information

Creates N drawing elements. Each drawing element displays a sequence of points at given coordinates of the hosting container. The point position (point[2] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.TrailNPoints (Draws nPoints trails. Var. linked to the model: x[nPoins], y[nPoints]).

Parameters

NameDescription
maximumPointsMaximum number of points to be drawn (if 0 all the values are drawn)
nPointsNumber of points to be drawn
nSkipNumber of points to skip before plotting one
lineColorLine color
trailLabel Label of the trail in the plot
sizeSymbolSymbol size
styleSymbolSymbol style
fillingColorSFilling color of the symbol
outlineColorSColor of the symbol outline

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components

Interactive.ViewElements.Drawables.Line Interactive.ViewElements.Drawables.Line

Information

Creates a drawing element that displays a sequence of points at given coordinates of the hosting container.
The point coordinates (PointPosition[:] variable) can be linked to the model variables.
The point about which rotation take place (Origin[:] variable),the rotation degrees in axes x, y and z (Degrees[:] variable) can be linked to the model variables.

Extends from Interactive.src.ViewElements.Drawables.Line (Polygonal line or polygon with a number of points equals to nPoints. Var. linked to the model: PointPosition[nPoints], colors[11], Origin[3], Degrees[3], Center[3]).

Parameters

NameDescription
colorpThe color used for the filling the component
diffusepDiffuse
specularp 
specularPowerp 
opacityp 
edgeVisibility1/0: set the visibility of edges
colorlp 
intColor1 if the color changes in time and 0 otherwise
nPointsnumber of points of the polygonal line
intPosintPos = 1 ==> the center and axes change in time
lineWidthline width
representationWireframe1 only line, 0 closed polygonal line

Connectors

NameDescription
pLeftConnector of drawable components
cLeftConnector of drawable components
Automatically generated Thu Apr 28 12:24:21 2022.