Trailing-Edge
-
PDP-10 Archives
-
decuslib10-02
-
43,50247/plttop.f4
There are no other files named plttop.f4 in the archive.
SUBROUTINE PLTTOP(IWIDE,IX,IY,JX,JY,NEWX,NEWY)
C
C DONALD BARTH, CHEMISTRY DEPT., HARVARD UNIVERISTY
C
C ROUTINE TO CALCULATE POSITION ABOVE LINE MIDPOINT
C
C IWIDE = DISTANCE TO BE FROM LINE
C IX = HORIZONTAL COORDINATE OF START OF LINE
C IY = VERTICAL COORDINATE OF START OF LINE
C JX = HORIZONTAL COORDINATE OF END OF LINE
C JY = VERTICAL COORDINATE OF END OF LINE
C NEWX = RETURNED WITH CALCULATED X COORDINATE
C NEWY = RETURNED WITH CALCULATED Y COORDINATE
C
C DETERMINE OCTANT CONTAINING LINE
IDSTX=JX-IX
IDSTY=JY-IY
IF(IDSTX-IDSTY)1,2,3
1 IF(IDSTX+IDSTY)8,8,4
2 IF(IDSTX+IDSTY)8,10,8
3 IF(IDSTX+IDSTY)6,8,8
4 IF(IDSTX)5,5,7
5 MOVEX=IWIDE
GO TO 107
6 IF(IDSTX)7,5,5
7 MOVEX=-IWIDE
107 MOVEY=-(IDSTX*MOVEX)/IDSTY
KX=IWIDE-(MOVEY/4)
GO TO 13
8 MOVEY=IWIDE
MOVEX=-(IDSTY*MOVEY)/IDSTX
IF(MOVEX)11,12,12
10 MOVEY=IWIDE
MOVEX=0
GO TO 14
C
C CORRECT WIDTH OF STRIP FOR ANGLE OF LINE
11 KX=IWIDE+(MOVEX/4)
GO TO 13
12 KX=IWIDE-(MOVEX/4)
13 MOVEY=(KX*MOVEY)/IWIDE
MOVEX=(KX*MOVEX)/IWIDE
C
C RETURN NEW POINT
14 NEWX=IX+MOVEX+(IDSTX/2)
NEWY=IY+MOVEY+(IDSTY/2)
RETURN
END