File: sample01.f90

package info (click to toggle)
dcl 7.5.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,172 kB
  • sloc: fortran: 48,440; f90: 12,803; ansic: 6,566; makefile: 4,747; ruby: 184; sh: 153
file content (23 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

program sample01

  use dcl
  integer,parameter :: nmax = 400
  real,dimension(0:nmax) :: x,y,t

!-- リサジューの図 ----

    t = (/( n,n=0,nmax )/) / real(nmax)     ! 媒介変数(0≦t≦1)
    x = 1.e2  * sin( 2.*DCL_PI * 4.*t )     ! x = Asin(2πω t)
    y = 1.e-3 * cos( 2.*DCL_PI * 5.*t ) + 6.! y = Bcos(2πω't)+C

!-- グラフ ----

    call DclOpenGraphics()          ! 出力装置のオープン
    call DclNewFrame                ! 新しい描画領域を作成する

    call DclDrawScaledGraph( x, y ) ! おまかせでグラフを描く

    call DclCloseGraphics           ! 出力装置のクローズ

end program