	SUBROUTINE CENA(IDS,IDL,DIST,ENN)
      LOGICAL B1,B2,B3,B4,B5,B6,B7,B8,B9
      COMMON/EYCEP/EYE(3),CEN(3),UP(3)
      COMMON/BULK/I3STRT,I3END,OBJ(6,32)
      COMMON/PAINT/I2STRT,I2END,PIC(4,32)
	COMMON/OIL/IVECT(200)
      COMMON/LIMITS/XMIN,XMAX,YMIN,YMAX
      DATA CENFOR,D1,D2/5H(1X,1,5H9HCEN,5H1 CEN/
      DATA D3,D4,D5/5H2 CEN,5H3 DIS,2HT)/
      DATA FORM, F2/5H(1X,4,5HF5.1)/
      CALL BUTTON(1)
10    B1=.FALSE.
      B2=.FALSE.
      B3=.FALSE.
      B4=.FALSE.
      B5=.FALSE.
      B6=.FALSE.
      B7=.FALSE.
      B8=.FALSE.
      B9=.FALSE.
      CALL BUTTON(3,B1,B2,B3,B4,B5,B6,B7,B8,B9)
11    DX=0
      DY=0
      DZ=0
      DD=0
      CALL TEXT(0,0,0,0,0)
      CALL TEXT(100,200,7,1,CENFOR)
      CALL TEXT(100,150,7,1,FORM,CEN(1),CEN(2),CEN(3),DIST)
 2    CALL BUTTON(2,B1,B2,B3,B4,B5,B6,B7,B8,B9)
      IF(B1) DX=0.1
      IF(B2) DY=0.1
      IF(B3) DZ=0.1
	IF(B4) DD=0.1
      IF(B6) DX=-0.1
      IF(B7) DY=-0.1
      IF(B8) DZ=-0.1
      IF(B9) DD=-0.1
      IF(B5) GO TO 10
      IF(B1.AND.B6) GO TO 12
      IF(B2.AND.B7) GO TO 13
      CEN(1)=CEN(1)+DX
      CEN(2)=CEN(2)+DY
      CEN(3)=CEN(3)+DZ
	UP(1)=CEN(1)
	UP(2)=CEN(2)+10.0
	UP(3)=CEN(3)
      DIST=DIST+DD
      CALL ROTER
      CALL MAPPER(DIST)
      CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,7,0,0)
      CALL DISPLY(6,IDS,IVECT,1,LAST)
      CALL DISPLY(3,IDL)
      IH=IDS
      IDS=IDL
	IDL=IH
      ENN=ENN+1.0
      GO TO 11
12    CEN(1)=0
      CEN(2)=0
      CEN(3)=0
      DIST=8.0
      GO TO 10
13    RETURN
	END
