Home Search Up Reference Manuals Return
Program GLPLOT is a three-dimensional geometry plotting program written in OpenGL, for graphical representation of the calculation model. The geometry of the model are read from BODY-commands given in the CALC input data file, with extension .frespf, .modalf, .quasif, .runf or .tsimf. Description of available BODY-commands is given in this manual page. Execution of program GLPLOT starts by pressing the glplot-button, or writing by the command "glplot".
Program GLPLOT can read two arguments:File
If the user clicks on "File" or presses <Alt>F on the keyboard,
following sub-menu will appear:
Read_Runf | = | Read geometry from input data file *.runf, *.frespf, *.modalf, *.quasif, or '.tsimf. |
Read_GPdat | = | Read data from a GPdat-file. |
Create Video | = | Create a video file in wmv- and/or ogg- format. |
Exit | = | Stops the execution of program GLPLOT. |
View
If the user clicks on "View" or presses <Alt>V on the keyboard,
following sub-menu will appear:
Moving_View | = |
Fixed viewing system show the model relative to fsys.
The coordinate of the window center relative to fsys is defined in the popup menu View -> Window Center.
The location of the observer relative to the window center is defined in the popup menu View -> Observer Position. Esys/Lsys Translation The window center coordinate is defined relative to an esys or lsys. When the animation starts Window Center moves with the selected coordinate system. Observer Position is defined relative to Window Center. Esys/Lsys Rotation The window center coordinate is defined relative to an esys or lsys. When the animation starts Window Center moves with the selected coordinate system. Observer Position stands still, but the direction of the view follows Window Center. |
Window_Center | = |
If Moving_View is set equal to Fixed viewing system,
the position of Window_Center is defined relative to fsys. If Moving_View is set equal to Esys/Lsys Translation or Esys/Lsys Rotation, the position of Window_Center is defined relative to the selected coordinate system. |
Observer_Position | = |
if Moving_View is set equal to Fixed viewing system or Esys/Lsys Translation,
the position of the observer is defined relative to Window Center. If Moving_View is set equal to Esys/Lsys Rotation, the position of the observer is defined relative to fsys. |
Up_Direction | = | Defines the direction which shall point up in the window. Railway vehicle models often have the Z-axis positive down to the ground, therefore is the default value of Up_Direction equal to (0.,0.,-1.) |
Perspective | = | Selects perspective view data |
Deformation_Scale | = | Sets scale factor for the animated motions. |
Transparency | = | Sets degree of transparency of the bodies in the model. |
Light | = | Sets different types of lights |
Show
If the user clicks on "Show" or presses <Alt>S on the keyboard,
following sub-menu will appear:
Masses | = | Selects masses to be shown |
Track | = | Select type of track to be shown |
Continuous_Animation | = | Select if the animation shall be continuous or not |
Help
If the user clicks on "Help" or presses <Alt>H on the keyboard,
following sub-menu will appear:
Users Manual | = | Opens the documentation with the web-browser defined in the environmentvariable $genhtml. |
Tool tips | = | Toggle button where the user can turn on or off tool tips. |
About | = | Creates a popup-menu showing the GLPLOT program version. |
Short Scale
In the short scale the user can control the speed of the animation.
<- A push button that starts backward animation.
|| A push button that stops animation.
-> A push button that starts forward animation.
Long Scale
In the long scale the user can manually control current picture of the animation.
The body commands is normally given in the *.runf, *.frespf, *.modalf, *.quasif, or '.tsimf-file, and is read by program GLPLOT by clicking "File->Read_Runf". The directive contains information regarding the geometrical shape of the masses in the model. The BODY-command has the following subcommands:
box_lsys | = | Defines a box shape body, the shape is described in coordinates of a lsys. |
box_mass | = | Defines a box shape body, the shape is described relative to the center of gravity of the mass. |
box_lsys_522 | = | Defines a box shape body with 5*2*2 number of nodes in order to show flexible modes in the body. |
box_mass_522 | = | As in BOX_LSYS_522, but the shape is described relative to the center of gravity of the mass. |
box_lsys_733 | = | Defines a box shape body with 7*3*3 number of nodes in order to show flexible modes in the body. |
box_mass_733 | = | As in BOX_LSYS_733, but the shape is described relative to the center of gravity of the mass. |
car_lsys_522 | = | Similar to BOX_LSYS_522 but end a0 of the box is shaped like a front of railway a vehicle. |
car_mass_522 | = | Similar to BOX_MASS_522 but end a0 of the box is shaped like a front of railway a vehicle. |
cylx_lsys | = | Defines a cylindrical shaped body, the shape is described in relation to a lsys. |
cylx_mass | = | Defines a cylindrical shaped body, the shape is described relative to the center of gravity of the mass. |
figure_lsys | = | Defines an arbitrary shaped body, the shape is described in coordinates of a lsys. |
figure_mass | = | Defines an arbitrary shaped body, the shape is described relative to the center of gravity of the mass. |
opengl_mass | = | Defines a geometric primitive according to OpenGL. The geometric figure is described relative to the center of gravity of the mass. |
opengl2_mass | = | Defines geometric figures consisting of several OpenGL geometric primitives. The geometric figure is described relative to the center of gravity of the mass. |
whe_set_lsys | = | Defines a wheelset shaped body, the shape is described in coordinates of a lsys. |
whe_set_mass | = | Defines a wheelset shaped body, the shape is described relative to the center of gravity of the mass. |
Both box_lsys and box_lsys_522 are used to create a figure in box shape, and both have the same set of input data. The difference between box_lsys and box_lsys_522, is that box_lsys_522 has 5 nodes along each side which are parallel to the X-axle. The idea for creating a box with several nodes lying on a straight line is to make it possible to animate structural flexibility of the body. The corners of the box are given relative to a local coordinate system lsys. The input data consists of the following items:
body box_lsys_522 bname lsys (+-')a0 (+-')a1 (+-')b0 (+-')b1 (+-')h0 (+-')h1
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
lsys | = | The name of the lsys-system in which the values a0,a1,b0,,, etc. should refer to. |
a0 | = | Distance from the reference point to the front edge of the box |
a1 | = | Distance from the reference point to the rear edge of the box |
b0 | = | Distance from the reference point to the right side of the box |
b1 | = | Distance from the reference point to the left side of the box |
h0 | = | Distance from the reference point to the lower edge of the box |
h1 | = | Distance from the reference point to the upper edge of the box |
Both box_mass and box_mass_522 are used to create a figure in box shape, and both have the same set of input data. The difference between box_mass and box_mass_522, is that box_mass_522 has 5 nodes along each side which are parallel to the X-axle. The idea for creating a box with several nodes lying on a straight line is to make it possible to animate structural flexibility of the body. The corners of the box are given relative to the center of gravity of the mass. The input data consists of the following items:
body box_mass_522 bname (+-')a0 (+-')a1 (+-')b0 (+-')b1 (+-')h0 (+-')h1
bname | = | Name of the created body. NB. The name must be equal to the name
of the mass stored on the GPdat-file,
if plotting of the deformation shapes shall be possible. The center of gravity of the mass is the reference point in which the values a0,a1,b0,,, etc. will refer to. |
a0 | = | Distance from the reference point to the front edge of the box |
a1 | = | Distance from the reference point to the rear edge of the box |
b0 | = | Distance from the reference point to the right side of the box |
b1 | = | Distance from the reference point to the left side of the box |
h0 | = | Distance from the reference point to the lower edge of the box |
h1 | = | Distance from the reference point to the upper edge of the box |
Box_lsys_733 is used to create a figure in box shape. The box consists of 36 nodes in total, in order to give a better shape of the flexible mode.
Input data Syntax:
body box_lsys_733 bname lsys (+-')a111 (+-')b111 (+-')h111 (+-')a113 (+-')b113 (+-')h113 (+-')a131 (+-')b131 (+-')h131 (+-')a133 (+-')b133 (+-')h133 (+-')a711 (+-')b711 (+-')h711 (+-')a713 (+-')b713 (+-')h713 (+-')a731 (+-')b731 (+-')h731 (+-')a733 (+-')b733 (+-')h733
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
lsys | = | The name of the lsys-system in which the values a11,b111,,, etc. should refer to. |
a111, b111, h111 | = | Front lower right hand corner of the box |
a113, b113, h113 | = | Front upper right hand corner of the box |
a131, b131, h131 | = | Front lower left hand corner of the box |
a133, b133, h133 | = | Front upper left hand corner of the box |
a711, b711, h711 | = | Rear lower right hand corner of the box |
a713, b713, h713 | = | Rear upper right hand corner of the box |
a731, b731, h731 | = | Rear lower left hand corner of the box |
a733, b733, h733 | = | Rear upper left hand corner of the box |
Box_mass_733 is used to create a figure in box shape. The box consists of 36 nodes in total, in order to give a better shape of the flexible mode.
Input data Syntax:
body box_mass_733 bname (+-')a111 (+-')b111 (+-')h111 (+-')a113 (+-')b113 (+-')h113 (+-')a131 (+-')b131 (+-')h131 (+-')a133 (+-')b133 (+-')h133 (+-')a711 (+-')b711 (+-')h711 (+-')a713 (+-')b713 (+-')h713 (+-')a731 (+-')b731 (+-')h731 (+-')a733 (+-')b733 (+-')h733
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
a111, b111, h111 | = | Front lower right hand corner of the box |
a113, b113, h113 | = | Front upper right hand corner of the box |
a131, b131, h131 | = | Front lower left hand corner of the box |
a133, b133, h133 | = | Front upper left hand corner of the box |
a711, b711, h711 | = | Rear lower right hand corner of the box |
a713, b713, h713 | = | Rear upper right hand corner of the box |
a731, b731, h731 | = | Rear lower left hand corner of the box |
a733, b733, h733 | = | Rear upper left hand corner of the box |
Subcommand cylx creates a body with a cylindrical shape. The location of the cylinder is defined in the reference point. The input data consists of the following items:
body cylx bname ref_point(1:3) radius height
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
ref_point(1:3) | = | X-,Y- and Z- coordinates relative to lsys to the reference point in which the values radius and height refers to. The coordinate system lsys is the linear local coordinate system which the body is related to. |
radius | = | The radius of the cylinder. |
height | = | The height of the cylinder. |
Subcommand cylx_lsys creates a body with a cylindrical shape. The location of the cylinder is defined in lsys. The input data consists of the following items:
body cylx_lsys bname lsys radius height
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
lsys | = | The name of the lsys-system which defines the center of the cylinder. |
radius | = | The radius of the cylinder. |
height | = | The height of the cylinder. |
Subcommand cylx_mass creates a body with a cylindrical shape. The location of the cylinder is defined by the center of gravity of the mass. The input data consists of the following items:
body cylx_mass bname radius height
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. The center of the cylinder will be equal to the center of gravity of the mass. |
radius | = | The radius of the cylinder. |
height | = | The height of the cylinder. |
The shape of the body is built-up of a number of polygons. All the coordinates are given in relation to a reference point, in order to simplify the copying of the figures. The input data consists of the following items:
body figure bname (+-')ref_point(1:3) (+-')Npolygons (+-')Npoints1 (+-')point11(1:3) (+-')point12(1:3),,, (+-')Npoints2 (+-')point21(1:3) (+-')point22(1:3),,, . . . . . . . . . . . .
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
ref_point(1:3) | = | X-,Y- and Z- coordinates relative to lsys to the reference point in which the values point11,point12,point21,,, etc. refers to. The coordinate system lsys is the linear local coordinate system which the body is related to. |
Npolygons | = | Number of polygons which builds up the body |
Npoints1 | = | Number of nodes in polygon number 1 |
point11(1:3) | = | X-,Y- and Z- coordinates for node #1 in polygon #1 relative to ref_point |
point12(1:3) | = | X-,Y- and Z- coordinates for node #2 in polygon #1 relative to ref_point |
point13(1:3) | = | Etc. |
Npoints2 | = | Number of nodes in polygon number 2 |
point21(1:3) | = | X-,Y- and Z- coordinates for node #1 in polygon #2 relative to ref_point |
point22(1:3) | = | X-,Y- and Z- coordinates for node #2 in polygon #2 relative to ref_point |
point23(1:3) | = | Etc. |
The shape of the body is built-up of a number of polygons. All the coordinates are given relative to lsys. The input data consists of the following items:
body figure_lsys bname lsys (+-')Npolygons (+-')Npoints1 (+-')point11(1:3) (+-')point12(1:3),,, (+-')Npoints2 (+-')point21(1:3) (+-')point22(1:3),,, . . . . . . . . . . . .
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
lsys | = | The name of the lsys-system in which the coordinates of the figure refers to. |
Npolygons | = | Number of polygons which builds up the body |
Npoints1 | = | Number of nodes in polygon number 1 |
point11(1:3) | = | X-,Y- and Z- coordinates for node #1 in polygon #1 relative to ref_point |
point12(1:3) | = | X-,Y- and Z- coordinates for node #2 in polygon #1 relative to ref_point |
point13(1:3) | = | Etc. |
Npoints2 | = | Number of nodes in polygon number 2 |
point21(1:3) | = | X-,Y- and Z- coordinates for node #1 in polygon #2 relative to ref_point |
point22(1:3) | = | X-,Y- and Z- coordinates for node #2 in polygon #2 relative to ref_point |
point23(1:3) | = | Etc. |
The shape of the body is built-up of a number of polygons. All the coordinates are given relative to the center of gravity of the mass. The input data consists of the following items:
body figure_mass bname (+-')Npolygons (+-')Npoints1 (+-')point11(1:3) (+-')point12(1:3),,, (+-')Npoints2 (+-')point21(1:3) (+-')point22(1:3),,, . . . . . . . . . . . .
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
Npolygons | = | Number of polygons which builds up the body |
Npoints1 | = | Number of nodes in polygon number 1 |
point11(1:3) | = | X-,Y- and Z- coordinates for node #1 in polygon #1 relative to ref_point |
point12(1:3) | = | X-,Y- and Z- coordinates for node #2 in polygon #1 relative to ref_point |
point13(1:3) | = | Etc. |
Npoints2 | = | Number of nodes in polygon number 2 |
point21(1:3) | = | X-,Y- and Z- coordinates for node #1 in polygon #2 relative to ref_point |
point22(1:3) | = | X-,Y- and Z- coordinates for node #2 in polygon #2 relative to ref_point |
point23(1:3) | = | Etc. |
Defines a geometric primitive according to OpenGL. The geometric figure is described relative to the center of gravity of the mass. The input data consists of the following items:
body opengl_mass mname (+-')Red (+-')Green (+-')Blue (+-')Alpha Primitive (+-')Nnodes (+-')Coords(1:3,1:Nnodes) (+-')Normals(1:3,1:Nnodes)
bname | = | Name of mass to which this figure shall be related to. |
Red | = | Portion of red color of this geometric primitive. The value of Red must be in between 0-1. |
Green | = | Portion of red color of this geometric primitive. The value of Green must be in between 0-1. |
Blue | = | Portion of red color of this geometric primitive. The value of Blue must be in between 0-1. |
Alpha | = | Transparency. The value of Alpha must be in between 0-1. Alpha=1. gives solid colors. |
Primitive | = | Define type of geometric primitive, see table and figure below. |
Nnodes | = | Number of nodes which builds up the geometric primitive. |
Coords | = | The X-, Y- and Z-coordinates for all nodes. |
Normals | = | The normal direction for the surface at the node. |
Valid geometric primitives are:
GL_POINTS | Draws a point at each of the n vertices. |
GL_LINES | Draws a series of unconnected line segments. Segments are drawn between v0 and v1, between v2 and v3, and so on. If n is odd, the last segment is drawn between vn-3 and vn-2, and vn-1 is ignored. |
GL_LINE_STRIP | Draws a line segment from v0 to v1, then from v1 to v2, and so on, finally drawing the segment from vn-2 to vn-1. Thus, a total of n-1 line segments are drawn. Nothing is drawn unless n is larger than 1. There are no restrictions on the vertices describing a line strip (or a line loop); the lines can intersect arbitrarily. |
GL_LINE_LOOP | Same as GL_LINE_STRIP, except that a final line segment is drawn from vn-1 to v0, completing a loop. |
GL_TRIANGLES | Draws a series of triangles (three-sided polygons) using vertices v0, v1, v2, then v3, v4, v5, and so on. If n isn't an exact multiple of 3, the final one or two vertices are ignored. |
GL_TRIANGLE_STRIP | Draws a series of triangles (three-sided polygons) using vertices v0, v1, v2, then v2, v1, v3 (note the order), then v2, v3, v4, and so on. The ordering is to ensure that the triangles are all drawn with the same orientation so that the strip can correctly form part of a surface. Preserving the orientation is important for some operations, such as culling. n must be at least 3 for anything to be drawn. |
GL_TRIANGLE_FAN | Same as GL_TRIANGLE_STRIP, except that the vertices are v0, v1, v2, then v0, v2, v3, then v0, v3, v4, and so on. |
GL_QUADS | Draws a series of quadrilaterals (four-sided polygons) using vertices v0, v1, v2, v3, then v4, v5, v6, v7, and so on. If n isn't a multiple of 4, the final one, two, or three vertices are ignored. |
GL_QUAD_STRIP | Draws a series of quadrilaterals (four-sided polygons) beginning with v0, v1, v3, v2, then v2, v3, v5, v4, then v4, v5, v7, v6, and so on. n must be at least 4 before anything is drawn. If n is odd, the final vertex is ignored. |
GL_POLYGON | Draws a polygon using the points v0, ... , vn-1 as vertices. n must be at least 3, or nothing is drawn. In addition, the polygon specified must not intersect itself and must be convex. If the vertices don't satisfy these conditions, the results are unpredictable. |
Defines geometric figures consisting of several OpenGL geometric primitives. The command simplifies the input data generation of common figures. The geometric figure is described relative to the center of gravity of the mass.
body opengl2_mass mname (+-')Red (+-')Green (+-')Blue (+-')Alpha Primitive (+-')Input_data
bname | = | Name of mass to which this figure shall be related to. |
Red | = | Portion of red color of this geometric primitive. The value of Red must be in between 0-1. |
Green | = | Portion of red color of this geometric primitive. The value of Green must be in between 0-1. |
Blue | = | Portion of red color of this geometric primitive. The value of Blue must be in between 0-1. |
Alpha | = | Transparency. The value of Alpha must be in between 0-1. Alpha=1. gives solid colors. Alpha=0. gives an invisible geometric figure. |
Primitive | = | Valid geometric figures are: BOX Creates a box consisting of six GL_QUADS. CYL_W_DISKCreates a horizontal cylinder with two disks at both ends. |
Input_data | = | Input data to the geometric figures BOX or CYL_W_DISK, see table below. |
Input data to the geometric figures:
BOX | X0, X1, Y0, Y1, Z0, Z1 Creates a box with the following size: (X1-X0, Y1-Y0, Z1-Z0). |
CYL_W_DISK | ro N H1 H2 Creates a cylinder with two disks (top and bottom). The cylinder is oriented in lateral direction. ro the radius of the cylinder N the number of divisions of the circle H1 the distance to the bottom of the cylinder H2 the distance to the top of the cylinder |
Subcommand whe_set creates a body which resembles a wheelset. The body is built-up of two circles which are connected by a straight line. The center of the wheelset is defined in the reference point. The input data consists of the following items:
body whe_set bname (+-')whe_set_center(1:3) (+-')ro (+-')bo
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
whe_set_center(1:3) | = | X-,Y- and Z- coordinates relative to lsys to the reference point in which the values Ro and Bo refers to. The coordinate system lsys is the linear local coordinate system which the body is related to. |
ro | = | The radius of the wheels. |
bo | = | The lateral semi-distance between the wheels. |
Subcommand whe_set_lsys creates a body which resembles a wheelset. The body is built-up of two circles which are connected by a straight line. The center of the wheelset is defined in lsys. The input data consists of the following items:
body whe_set_lsys bname lsys (+-')ro (+-')bo
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
lsys | = | The name of the lsys-system in which the wheelset refers to. |
ro | = | The radius of the wheels. |
bo | = | The lateral semi-distance between the wheels. |
Subcommand whe_set_mass creates a body which resembles a wheelset. The body is built-up of two circles which are connected by a straight line. The center of the figure is defined relative to the center of gravity of the mass. The input data consists of the following items:
body whe_set_mass bname (+-')ro (+-')bo
bname | = | Name of the created body. NB. The name must be equal to the name of the mass stored on the GPdat-file, if plotting of the deformation shapes shall be possible. |
ro | = | The radius of the wheels. |
bo | = | The lateral semi-distance between the wheels. |
Home Up Reference Manuals Return