The PIVOT statement causes the rotation of all lines, except those generated by the AXES, GRID, LABEL and SYMBOL statements. This includes lines generated by the MOVE, DRAW, IMOVE, IDRAW, PLOT, IPLOT, RPLOT, POLYGON, POLYLINE, and RECTANGLE statements. This rotation takes place about the logical position. The PIVOT statement effects only the starting point of the LABEL and SYMBOL statements.
If both the PIVOT and PDIR angles are set, they both have an effect on the lines being generated. The transformation on the statements affected by the PDIR commands takes place first. Then the transformations on the lines affected by the PIVOT command are done. A few examples will help demonstrate this.
10 GINIT
20 DEG
30 DRAW 50,50
40 PIVOT 0
50 PDIR 0
60 POLYGON 10,10,8
70 IDRAW 10,10
80 END
No rotations are done since both angles are set to zero. Now change line 50 to have a rotation of 90 degrees.
50 PDIR 90
The rotation of 90 effects the POLYGON statement, but not the IDRAW. This is because PDIR only affects the IPLOT, RPLOT, POLYGON, POLYLINE, and RECTANGLE statements. Now change line 40 to have a rotation of 45 degrees.
40 PIVOT 45
The POLYGON statement is rotated a total of 135 degrees, by the combination of the PIVOT 45 and the PDIR 90 statements. You will notice that the IDRAW line has been rotated only 45 degrees by the effect of the PIVOT 45 statement. Now change line 50 back to 0 degrees.
50 PDIR 0
The IDRAW line is still rotated by 45 degrees. The POLYGON statement is rotated by 45 degrees as a result of the PIVOT angle. Hopefully this example will clear up some of the confusion when applying both the PIVOT and PDIR transforms to graphic lines.