1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
program moocow
dimension a(20000)
integer*4 jwg_create_handle
parameter (ix=10,iy=10,iw=150,icolor=1,width=0.0)
jx=ix/2
jy=iy/2
sx=5.0/(1.0*jx)
sy=5.0/(1.0*jy)
do j=1,iy
y=(j-jy)*sy
k=iw*(j-1)
do i=1,ix
x=(i-jx)*sx
a(k+i)=x*y
C 4.0*r(x,y)
end do
end do
ihandle=jwg_create_handle(1,'ex1.cgm')
call jwg_def_xform(ihandle)
sx=300.0/(1.0*(ix-1))
sy=300.0/(1.0*(iy-1))
call jwg_push_state(ihandle)
call jwg_add_xform(ihandle,100.0,100.0,sx,0.0,0.0,sy)
call jwg_add_xform(ihandle,-1.0,-1.0,1.0,0.0,0.0,1.0)
call jwg_pass_data(ihandle,a,ix,iy,iw)
C do i=1,5
i=0
clevel= -45+(i*15)
clevel=15.0
red=(i*1.0)/5.0
green=red
blue=red
call jwg_set_pen(ihandle,red,green,blue,0.0)
call jwg_contour(ihandle,clevel,-1,1)
C end do
call jwg_destroy_data(ihandle)
sx=5.0/(1.0*jx)
sy=5.0/(1.0*jy)
do j=1,iy
y=(j-jy)*sy
k=iw*(j-1)
do i=1,ix
x=(i-jx)*sx
a(k+i)=x*y
end do
end do
C call jwg_add_xform(ihandle,0.0,iy*1.0,1.0,0.0,0.0,1.0)
C call jwg_add_xform(ihandle,0.0,iy*0.1,1.0,0.0,0.0,1.0)
C call jwg_pass_data(ihandle,a,ix,iy,iw)
do i=1,5
clevel= -45+(i*15)
red=(i*1.0)/5.0
green=red
blue=red
C call jwg_set_pen(ihandle,red,green,blue,0.0)
C call jwg_contour(ihandle,clevel,-1,1)
end do
C call jwg_destroy_data(ihandle)
call jwg_pop_state(ihandle)
call jwg_destroy_handle(ihandle)
end
function r(x,y)
r=sqrt((x*x)+(y*y))
return
end
function sinc(a)
if(a.ne.0.)then
sinc=sin(a)/a
else
sinc=1.0
endif
return
end
|