6. 2次元データを用いた鳥瞰図



ソースプログラム(Fortran 90,自動倍精度利用)
!******************************** ! 3D Graphic Sample No. 1 * ! Bird's Eye View * !******************************** program gsample6 implicit none integer, parameter :: imax = 50, jmax = 50 real t2(0:imax,0:jmax) real xmin,xmax,ymin,ymax,zmin,zmax,dx,dy,xx,yy real func integer i,j call fr_ginit call fr_opencanvas(1,'gsample6',101) xmin = -15 xmax = 15 ymin = -15 ymax = 15 zmin = -15.0 zmax = 15.0 dx = (xmax-xmin)/imax dy = (ymax-ymin)/jmax call fr_project(5.0,1) call fr_margin3d(20,30,30,60) call fr_angle3d(40.0,-150.0) call fr_aspect3d(1.0,1.0,1.0,0) call fr_frame3d(xmin,xmax,ymin,ymax,zmin,zmax,3) call fr_xyzname('x-axis','y-axis','z-axis') do j = 0, jmax yy = dy*j + ymin do i = 0, imax xx = dx*i + xmin t2(i,j) = func(xx,0.5*yy) enddo enddo call fr_profile(t2,imax+1,jmax+1,4,1) call fr_gend end program gsample6 function func(x,y) implicit none real func,x,y,xx xx = x*x + 3*y*y func = 20.0*cos(sqrt(xx))*exp(-0.01*xx) end function func


Copyright (C) Toshihiro Taguchi, Setsunan University, 2000-2012 All rights reserved.