12. 3次元スカラーデータを用いた断面等高色分布図



ソースプログラム(Fortran 90,自動倍精度利用)
!******************************** ! 3D Graphic Sample No. 7 * ! Multiple Slices * !******************************** program gsample12 implicit none integer, parameter :: imax = 30, jmax = 20, kmax = 20 real f(0:imax,0:jmax,0:kmax),td(3) real xmin,xmax,ymin,ymax,zmin,zmax,x,y,z,dx,dy,dz integer nu(3),i,j,k td(1) = 0 td(2) = 0 td(3) = -1.8 nu(1) = 3 nu(2) = 1 nu(3) = 2 xmin = -3 xmax = 3 ymin = -2 ymax = 2 zmin = -2 zmax = 2 dx = (xmax - xmin)/imax dy = (ymax - ymin)/jmax dz = (zmax - zmin)/kmax do k = 0, kmax z=dz*k+zmin do j = 0, jmax y=dy*j+ymin do i = 0, imax x=dx*i+xmin f(i,j,k)=exp(-0.5*((x-.5)**2+(y-.5)**2+(z-.5)**2)) & +exp(-1.2*((x+1.5)**2+(y+1.5)**2)-0.1*(z+1.5)**2) enddo enddo enddo call fr_ginit call fr_opencanvas(1,'gsample12',101) call fr_project(5.0,1) call fr_margin3d(10,20,10,80) call fr_angle3d(20.0,70.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') call fr_slices(f,imax+1,jmax+1,kmax+1,td,nu,20,-2,0) call fr_colorbar(70,180,15,100,1) call fr_gend end program gsample12


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