STISIM Drive
(SDL) - POLY - Polygons
Display a 2 dimensional
filled polygon in the roadway display. The polygon is transformed so that as
the driver approaches it, it is displayed in perspective. The polygon can be
filled with any active color. When trying to specify the events parameters for
this event, refer to the various views shown in the accompanying figure. Since
multiple polygons can be used, STISIM Drive requires that each
polygon be specified in its own ASCII text file. The polygons that are
displayed can only be 2 dimensional and in a single plane, therefore, the
program requires an anchor point and then the polygon data with respect to this
anchor point. Also, because of memory and speed concerns, the maximum number of
vertices in any polygon is limited to 25.
EVENT PARAMETERS:
PARAMETER 1: |
The longitudinal distance, in feet, of the polygon’s first vertex. This is the distance that the polygon is away from the driver when it initially appears, positive forward. |
PARAMETER 2: |
The physical lateral position, in feet, of the polygon’s first vertex. This is with respect to the roadway’s dividing line and is positive to the right. |
PARAMETER 3: |
The physical vertical position, in feet, of the polygon’s first vertex. This is with respect to the ground. This should always be positive. |
PARAMETER 4: |
The plane in which the
polygon will be displayed. The polygon can only be displayed in 1 of 3
planes. These planes are shown in the accompanying figure. To specify the
plane that the polygon will be displayed in, set parameter 4 to one of the
following: 0 - Y plane, polygon will
be displayed laterally and vertically like on a billboard 1 - Z plane, polygon will
be displayed longitudinally and vertically like on a building that is
extending down the roadway. 2 - X plane, polygon will be displayed longitudinally and laterally. |
PARAMETER 5: |
The color of the polygon.
The valid colors are defined using the "Set
Simulation Colors" and "Assign
Simulation Colors" options, found in the "Options" menu.
You may also assign the polygon a random color by using the following syntax
notation: *[low range]~[high range]
(for example *10~20) In this case, the program will randomly choose a color from all of the colors between the low range number and the high range number. In the example, a number between 10 and 20 (inclusive) would be used. |
PARAMETER 6: |
Name of an ASCII text
file that contains the polygon data. The format of the polygon file is as
follows: Total number of vertices
in the polygon (n) In the above format, lateral position means left and right across the polygon and vertical means up and down the polygon. The maximum number of vertices in any polygon is 25. |
EXAMPLE:
1000,POLY,1000,15,8,0,15,TESTPOLY
In the example shown the
polygon specified in the ASCII test file TESTPOLY will be displayed on the
screen. The polygon will appear after the driver has traveled 1000 feet down
the road and will initially appear 1000 feet in front of the driver
(1000,POLY,1000). Parameters 2 and 3 will set the physical location of the
polygon’s first vertex in the display scene. The polygon specified in TESTPOLY
is a left pointing triangle, with the left most point of the triangle being the
anchor point. For this case, the anchor point will be 15 feet to the right of
the roadway’s dividing line and 8 feet above the ground (15,8). The next
parameter defines the plane that the polygon will be appearing in. So far, all
we have done is specify an anchor point for the polygon’s first vertex. We must
now let the program know which direction to draw the polygon by specifying the
plane the polygon will be drawn in. In this case a value of 0 is used so that
the polygon will be displayed in the Y plane. The polygon will be displayed
using color 15.
The TESTPOLY file contains
the following information (remember that it is for a left pointing triangle
that has its initial vertex at the anchor point):
3
0,0
10,5
10,-5