9.2 $B%Y%/%H%k>l$N%9%1!<%j%s%0(B

2$Bl$rIA$/%5%V%k!<%A%s(B Vector.draw $B$G$O(B, $B%Y%/%H%[email protected],(B $B$r(BV-$B:BI87O$K$*$1$kC10L$GI=8=$7$F$$$^$9(B. $B$?$@$7lnrmal $B$,(B .TRUE.($B=i4|CM(B)$B$J$i$PFbItE*$K7hDj$5$l(B, .FALSE. $B$J$i$PFbItJQ(B $B?t(B xfact1, yfact1$B$r;2>H$7$^$9(B. $B$7$?$,$C$F(B, $B$3$N%G%b%W(B $B%m%0%i%`(B(U2D6)$B$N$h$&$K(B, $B%9%1!<%j%s%0%U%!%/%?!<$rM[$K;XDj$9$k>l9g(B $B$O(B, lnrmal $B$r(B .FALSE. $B$H$7$F(B xfact1 $B$H(B yfact1 $B$r@_Dj$7$^$9(B. $B$3$3$G(B $B$O(B, U $B$H(B V $B$NCM$,(B1$B7e0c$$$^$9$+$i(B, xfact1=0.5, yfact1=0.05 $B$H$7$^$7$?(B. $B$?$H$($P(B, $B%Y%/%H%k(B (U,V)=(0.1,1) $B$O(B, V- $B:BI87OC10L$G(B (0.05, 0.05) $B$NBg$-$5$N%Y%/%H%k$H$7$FI=<($5$l$^$9(B. $B$D$^$j(B, $B%9%1!<%j%s%0%U%!%/%?!<$H$O(B, $B

$B$^$?$3$NNc$G$O(B, $B%Q%i%a%?(B lunit $B$r(B .TRUE. $B$H$7$F%f%K%C%H(B $B%Y%/%H%k$rIA$$$F$$$^$9(B. ($B$3$N=i4|CM$O(B .FALSE.$B$G(B, $B%f%K%C%H%Y%/%H(B $B%k$rIA$-$^$;$s(B.) $BI=<($9$k%f%K%C%H%Y%/%H%k$NBg$-$5$O(B, V-$B:BI87O$NC10L$r(B $BMQ$$$F%Q%i%a%?(B vxunit, vyunit $B$r$=$l$>$l(B0.1$B$K@_Dj$7$F(B $B$$$^$9(B. $B$b$7$buxunit, uyunit $B$r@_Dj$9$k$3$H$G%f%K%C%H%Y%/%H%k$rIA$/$3$H$b$G$-$^$9(B. Vector.uvtitle $B%k!<%A%s$rMQ$$$k$H(B, $B$3$N%f%K%C%H%Y%/%H%k$K%?%$%H%k$r$D$1$k$3$H(B $B$,$G$-$^$9(B. xmail protected],$O(B 'U', ymail protected],$O(B 'V' $B$H$7$^$7$?(B. $B$J$*(B, $B?^$N2l9g$O(B, $B$=$l$>$l$r%9%1!<%j%s%0%U%!%/%?!<$G3d$C$?CM$H$J$j$^$9(B.

Vector$B$,?^$N2<$K=q$/%a%C%;!<%8$K$D$$$F$G$9$,(B, $B%f%K%C%H%Y%/%H%k$rIA$+$J(B $B$$$H$-$K$O%9%1!<%j%s%0%U%!%/%?!<$,I=<($5$l(B, $B%f%K%C%H%Y%/%H%k$rIA$/$H$-(B $B$K$O%f%K%C%H%Y%/%H%k$NBg$-$5$,I=<($5$l$^$9(B. $B%f%K%C%H%Y%/%H%k$rIA$/$H$-(B $B$K$b(B, $B%Q%i%a%?(B lumsg $B$r(B .FALSE. $B$H$9$k$3$H$K$h$C$F%9%1!<(B $B%j%s%0%U%!%/%?!<$NI=<($K@ZBX$($k$3$H$b$G$-$^$9(B. $B$^$?(B, $B%a%C%;!<%8$r2?$b(B $BIA$+$;$?$/$J$$$H$-$K$O(B, $B%Q%i%a%?(B lmsg $B$r(B .FALSE. $B$H$7$^(B $B$9(B.

#
# u2d6.rb

require "narray"
require "numru/advanceddcl"
include NumRu::AdvancedDCL
include NMath


nx = 11
ny = 11
xmin = -1
xmax = 1
ymin = -1
ymax = 1
u = NArray.sfloat(nx, ny)
v = NArray.sfloat(nx, ny)

#-- data ---
for j in 0..ny-1
  for i in 0..nx-1
    x = xmin + (xmax-xmin)*i/(nx-1).to_f
    y = ymin + (ymax-ymin)*j/(ny-1).to_f
    u[i,j] =  x * 0.1
    v[i,j] = -y
  end
end

#-- graph ---
Dev.open

Frame.new

Fig.window=[xmin, xmax, ymin, ymax]
Fig.viewport=[0.2, 0.8, 0.2, 0.8]
Fig.transnum=1

Axis.draw

Vector.lnrmal =  false
Vector.xfact1 = 0.5
Vector.yfact1 = 0.05
Vector.lunit =  true
Vector.vxunit = 0.1
Vector.vyunit = 0.1
Vector.vxuoff = 0.06
Vector.uvtitle('X', 'U')
Vector.uvtitle('Y', 'V')
Vector.draw(u, v)

Dev.close

PROGRAM U2D6





\resizebox{10cm}{!}{\includegraphics{u2d2/u2d6.eps}}
u2d6.rb: frame1