15. 3次元スカラーデータを用いた等値面



ソースプログラム(Fortran 90,自動倍精度利用)
!********************************* ! 3D Graphic Sample No. 10 * ! Isosurface * !********************************* program gsample15 implicit none integer, parameter :: imax = 10, jmax = 10, kmax = 50 real, parameter :: pi2 = 2*3.141592653589793 real f(-imax:imax,-jmax:jmax,0:kmax) real r0,f0,rc,rs integer i,j,k r0 = 5.5 f0 = 0.75 do k = 0, kmax rc = r0*cos(pi2*k/kmax) rs = r0*sin(pi2*k/kmax) do j = -jmax, jmax do i = -imax, imax f(i,j,k) = exp(-((i-rc)*(i-rc)+(j-rs)*(j-rs))/20.0) & +exp(-((i+rc)*(i+rc)+(j+rs)*(j+rs))/40.0) enddo enddo enddo call fr_ginit call fr_opencanvas(1,'gsample15',101) call fr_project(5.0,21) call fr_angle3d(30.0,-30.0) call fr_aspect3d(1.0,1.0,1.0,0) call fr_xyzname('x-ax','y-ax','z-ax') call fr_frame3d(-dble(imax),dble(imax),-dble(jmax),dble(jmax),0.0,dble(kmax),4) call fr_isosurface(f,2*imax+1,2*jmax+1,kmax+1,f0,3,6) call fr_gend end program gsample15


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