      PROGRAM wheel
      IMPLICIT NONE
      REAL*8 dt, omega, r, t, vcm, x, xmax, y
      INTEGER IR_
      DATA x/0.0D0/
      CALL GWopen(IR_, 0)
      CALL initial(r,omega,vcm,t,dt,xmax)
      CALL GWsetpen(IR_, -1, -1, -1, -1)
      DO WHILE(x .LE. xmax)
         x = -r*cos(omega*t) + vcm*t
         y = r*sin(omega*t)
*        PLOT x,y の後ろのセミコロンに注意
         CALL GWline2(IR_, REAL(x), REAL(y)) ! PLOT POINT: 文の省略形
         t = t + dt
      END DO
      CALL GWquit(IR_)
      END
C
      SUBROUTINE initial(r,omega,vcm,t,dt,xmax)
      IMPLICIT NONE
      REAL*8 r, omega, vcm, t, dt, xmax
      REAL mx, xmin
      INTEGER IR_
      t = 0
      r = 1                                 ! 車輪の半径
      omega = 1                             ! 車輪の角速度
      vcm = r*omega                         ! 質量中心の速度
      dt = 0.01D0                           ! 時間の増分
      xmin = -1
      xmax = 50
      mx = 0.01D0*(xmax - xmin)
      CALL GWindow(IR_, xmin-mx, -4.0, REAL(xmax+mx), 4.0)
*     y = -r (車輪の最下部) の位置に地面を描く
      CALL GWline(IR_, xmin, REAL(-r), REAL(xmax), REAL(-r))
      END
