Drawable elements
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).
Name | Description |
---|---|
![]() |
Draws a polygon |
![]() |
Draws an oval |
![]() |
Displays a string |
![]() |
Draws an arrow |
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
Displays a string + real number |
![]() |
|
![]() |
Draws a polygon
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]).
Name | Description |
---|---|
intColor | intColor = 1 ==> colors change in time |
intPos | intPos = 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 |
minHueRangeCellLUT | Set the minimum range in hue |
maxHueRangeCellLUT | Set the maximum range in hue |
minSatRangeCellLUT | Set the minimum range in hue |
maxSatRangeCellLUT | Set the maximum range in hue |
minValueRangeCellLUT | Set the minimum range in hue |
maxValueRangeCellLUT | Set the maximum range in hue |
minAlphaRangeCellLUT | Set the minimum range in hue |
maxAlphaRangeCellLUT | Set the maximum range in hue |
minRangeCellLUT | Set the minimum range of values mapped |
maxRangeCellLUT | Set the maximum range of values mapped |
linearScaleCellLUT | 1/0: linear/log10 scale of values |
linearCellLUT | 1/0: the values are mapped into colors using a linear ramp/S-curve |
displayVectors | 1/0: enable/disable the vector display |
minHueRangeVectorLUT | Set the minimum range in hue |
maxHueRangeVectorLUT | Set the maximum range in hue |
minSatRangeVectorLUT | Set the minimum range in hue |
maxSatRangeVectorLUT | Set the maximum range in hue |
minValueRangeVectorLUT | Set the minimum range in hue |
maxValueRangeVectorLUT | Set the maximum range in hue |
minAlphaRangeVectorLUT | Set the minimum range in hue |
maxAlphaRangeVectorLUT | Set the maximum range in hue |
minRangeVectorLUT | Set the minimum range of values mapped |
maxRangeVectorLUT | Set the maximum range of values mapped |
linearScaleVectorLUT | 1/0: linear/log10 scale of values |
linearVectorLUT | 1/0: the values are mapped into colors using a linear ramp/S-curve |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
Draws an oval
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).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
thetaResolution | Number of points in the longitude direction (ranging from startTheta to endTheta) |
startTheta | Starting longitude angle |
endTheta | Ending longitude angle |
phiResolution | Number of points in the latitude direction (ranging from startPhi to endPhi) |
startPhi | Starting latitude angle |
endPhi | Ending latitude angle |
tessellation | Cause 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 |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
Displays a string
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].).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
scale | |
intPos | intPos = 1 ==> the center and axes change in time |
text | Text displayed by the component |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
Draws an arrow
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).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
TipResolution | TipResolution = 1 ==> the tip is represented by a triangle |
ShaftResolution | Set the resolution of the shaft. 2 gives a rectangle |
TipLength | |
TipRadius | |
ShaftRadius |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
resolution | Number of facets used to define cone |
capping | 1/0: Turn on/off whether to cap cone with polygon |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
resolution | Number of facets used to define cylinder |
capping | 1/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) |
Radius0 | Cylinder radius |
Height0 | Cylinder height |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
nx | Number of cells in the x dimension |
ny | Number of cells in the y dimension |
nz | Number of cells in the z dimension |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
title | Title displayed by the scalarBar |
x | X coordinate of the scalarBar left corner in the normalized view-port (i.e., x-y (0,1) ) |
y | Y coordinate of the scalarBar left corner in the normalized view-port (i.e., x-y (0,1) ) |
Width | ScalarBar width in the normalized view-port (i.e., x-y (0,1) ) |
Height | ScalarBar height in the normalized view-port (i.e., x-y (0,1) ) |
nLabels | Number of labels displayed by the scalarBar |
maxNColors | Number of colors diplayed by the scalarBar |
labelFormat | format of the labels displayed by the scalarBar |
horizontal | 1/0: horizontal/vertical orientation of the scalarBar |
minHueRange | Set the minimum range in hue |
maxHueRange | Set the maximum range in hue |
minRange | Set the minimum range of values mapped into the scalarBar |
maxRange | Set the maximum range of values mapped into the scalarBar |
linearScaleLut | 1/0: linear/log10 scale of values |
linearLut | 1/0: the values are mapped into colors using a linear ramp/S-curve |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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]).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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]).
Name | Description |
---|---|
maximumPoints | Maximum number of points to be drawn (if 0 all the values are drawn) |
nSkip | Number of points to skip before plotting one |
lineColor | Line color |
trailLabel | Label of the trail in the plot |
sizeSymbol | Symbol size |
styleSymbol | Symbol style |
fillingColorS | Filling color of the symbol |
outlineColorS | Color of the symbol outline |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
nSides | Number of sides |
polygon | 1/0: enable/disable the production of a polygon |
polyline | 1/0: enable/disable the production of a polyline |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
RadialResolution | Number of points in radius direction |
CircumferentialResolution | Number of points in circumferential direction |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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]).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
RadialResolution | Number of points in radius direction |
CircumferentialResolution | Number of points in circumferential direction |
file3DS | Name of the 3DS file |
ScaleX | scale factor |
ScaleY | |
ScaleZ |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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]).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 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 |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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]).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
intPos | intPos = 1 ==> the center and axes change in time |
nSides | Number of sides |
polygon | 1/0: color or not the polygon |
polyline | 1/0: enable/disable the production of a polyline |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
Displays a string + real number
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]).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
scale | |
intPos | intPos = 1 ==> the center and axes change in time |
initText | Text displayed by the component before the real value |
finalText | Text displayed by the component after the real value |
intValue | intValue = 1 ==> the real value displayed by the component changes in time |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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]).
Name | Description |
---|---|
maximumPoints | Maximum number of points to be drawn (if 0 all the values are drawn) |
nPoints | Number of points to be drawn |
nSkip | Number of points to skip before plotting one |
lineColor | Line color |
trailLabel | Label of the trail in the plot |
sizeSymbol | Symbol size |
styleSymbol | Symbol style |
fillingColorS | Filling color of the symbol |
outlineColorS | Color of the symbol outline |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |
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]).
Name | Description |
---|---|
colorp | The color used for the filling the component |
diffusep | Diffuse |
specularp | |
specularPowerp | |
opacityp | |
edgeVisibility | 1/0: set the visibility of edges |
colorlp | |
intColor | 1 if the color changes in time and 0 otherwise |
nPoints | number of points of the polygonal line |
intPos | intPos = 1 ==> the center and axes change in time |
lineWidth | line width |
representationWireframe | 1 only line, 0 closed polygonal line |
Name | Description |
---|---|
pLeft | Connector of drawable components |
cLeft | Connector of drawable components |