home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff267.lzh / Diglib / diglib.zoo / diglib / SCALE.FOR < prev    next >
Text File  |  1989-06-20  |  886b  |  33 lines

  1.         SUBROUTINE SCALE(X,Y,VX,VY)
  2. C
  3. C       THIS SUBROUTINE CONVERTS THE POINT (X,Y) FROM WORLD COORDINATES
  4. C       TO THE POINT (VX,VY) IN VIRTUAL COORDINATES.
  5. C
  6.         INCLUDE PLTCOM.PRM
  7.         INCLUDE PLTSIZ.PRM
  8. C
  9. C       DEFINE "LOG10(0.0)" AS SMLLOG
  10. C
  11.         DATA SMLLOG /-100.0/
  12. C
  13.         XX = X
  14.         IF (.NOT. LOGX) GO TO 10
  15.                 IF (X .LE. 0.0) GO TO 5
  16.                         XX = ALOG10(X)
  17.                         GO TO 10
  18. 5                   CONTINUE
  19.                         XX = SMLLOG
  20. 10      CONTINUE
  21.         YY = Y
  22.         IF (.NOT. LOGY) GO TO 20
  23.                 IF (Y .LE. 0.0) GO TO 15
  24.                         YY = ALOG10(Y)
  25.                         GO TO 20
  26. 15                  CONTINUE
  27.                         YY = SMLLOG
  28. 20      CONTINUE
  29.         VX = XVSTRT + XVLEN*(XX-UX0)/UDX
  30.         VY = YVSTRT + YVLEN*(YY-UY0)/UDY
  31.         RETURN
  32.         END
  33.