FortranによるVRMLの利用方法


 地球磁気圏などの3次元シミュレーション結果をよりよく理解するためには、 3次元可視化は不可欠である。ここに、インターネット3次元可視化のための 国際標準言語VRML(Virtual Reality Modeling Language)の登場のよって、 3次元画像処理専用機と3次元画像処理専用ソフトウエアを持たなくても、 VRMLファイルとVRMLのビューア(cosmoplayerなど)さえあれば誰でも3次元画 像を自分の好きなよ うに見ることができるようになった。そのVRML3次元画像ファイルをFortran によって作成する方法と例題、及びVRMLコンテンツ作成用のインターフェース サブルーチンパッケージを示す。


English version is here.

1.基本的な例題1

No. Contents Fortran Program VRML file gif file

サブルーチンパッケージ pk1subrtn.f

1 立方体 box1.f box1.wrl box1.gif
2 直方体 box2.f box2.wrl box2.gif
3 三角柱 cone1.f cone1.wrl cone1.gif
4 円柱 cylinder1.f cylinder1.wrl cylinder1.gif
5 sphere1.f sphere1.wrl sphere1.gif
6 背景色 backgrd4.f backgrd4.wrl backgrd4.gif
7 文字列 text1.f text1.wrl text1.gif
8 折れ線 1色 lineset1.f lineset1.wrl lineset1.gif
9 折れ線 グラデーション lineset2.f lineset2.wrl lineset2.gif
10 点線 1色 pointset1.f pointset1.wrl pointset1.gif
11 点線 グラデーション pointset2.f pointset2.wrl pointset2.gif
12 太い矢印 arrow2.f arrow2.wrl arrow2.gif
13 太さのある曲線 linemesh1.f linemesh1.wrl linemesh1.gif
14 面1 mesh1.f mesh1.wrl mesh1.gif
15 面2 triangb1.f triangb1.wrl triangb1.gif
16 面3 triangm1.f triangm1.wrl triangm1.gif
17 立体 defusem1.f defusem1.wrl defusem1.gif
18 テクスチャ画像の貼りつけ image1.f image1.wrl image1.gif
19 複雑な表面 ebmesh3d.f ebmesh3d.wrl ebmesh3d.gif


2.基本的な例題2

  
No. Contents Fortran Program VRML file gif file jpg file rgb file

サブルーチンパッケージ
zvrsuba.f




1 文字を描く msymbol.f msymbol.wrl msymbol.gif

2 点を描く mpoint.f mpoint.wrl mpoint.gif

3 線を描く mline.f mline.wrl mline.gif

4 三角メッシュを描く mtriangm.f mtriangm.wrl mtriangm.gif mtriangm.jpg mtriangm.rgb
5 ピクセルイメージを描く mzpt03.f mzpt03.wrl mzpt03.gif mzpt03.jpg mzpt03.rgb
6 枠とピクセルイメージと文字を描く mpixe015.f mpixe015.wrl mpixe015.gif mpixe015.jpg mpixe015.rgb
7 等値面を描く mcube301.f mcube301.wrl mcube301.gif mcube301.jpg mcube301.rgb
8 外部磁気圏の3次元格子 outline3d.f outline3d.wrl outline3d.gif outline3d.jpg
9 内部磁気圏の3次元格子 inline3d.f inline3d.wrl inline3d.gif inline3d.jpg
10 電離圏の3次元格子 denine3d.f denline3d.wrl denline3d.gif denline3d.jpg


3.応用

No. Contents Fortran Program VRML file gif file

サブルーチンパッケージ zvrsuba.f

1 地球磁気圏のプラズマ温度などの断面図をピクセルイメージで描く zvrcroa.f zvrcroa.wrl zvrcroa.gif
2 地球磁気圏の3次元構造を描く zvrmaga.f zvrmaga.wrl zvrmaga.gif
3 ピクセルイメージと磁力線の3次元画像の合成
zvr01.wrl zvr01.gif

サブルーチンパッケージ zvrsuba.f

4 地球磁気圏のプラズマ温度分布を多重ピクセル面イメージを使って描く zvrmpxa.f fa410zx.wrl
fa410yz.wrl
fa410xy.wrl
fa410xyz.wrl
fa410zx.gif
fa410yz.gif
fa410xy.gif
fa410xyz.gif


4.3-Dimensional MHD Simulation of Earth's Magnetosphere   (Example to execute the MHD Code and Graphic programs)

No. Contents Fortran Main Program Subroutine Package PostScript file VRML file or gif file
3D MHD simulation of 1/4 earth's magnetosphere earthb10.f


Graphics program to make PostScript files
1 noon-midnight meridian and equatorial plots (black and white) gm150b.f gsub150.f gm150b.ps gm150b.gif
2 energy distribution of cross section gm220b.f gsub220.f gm220b.ps gm220b.gif
3 3-dimensional magnetic field lines gm480b.f gsub480.f gm480b.ps gm480b.gif
3-dimensional graphics program by VRML files (Virtual Reality Modeling Language)
1 3-dimensional magnetic field lines zvrmagb.f zvrsuba.f
zvrml1b.wrl
zvrml1b.jpg
2 cross sectional pattern by pixel image zvrcrob.f zvrsubb.f


5.Visualization to Various 3-dimensional MHD Models of Earth's Magnetosphere

5-a. Half volume model of earth's magnetosphere with IMF By and Bz components

No. Contents Fortran Main Program VRML file gif file

Subroutine Package zvrsuba.f

1 3-dimensional magnetic field lines zvrmaga.f fa410w.wrl fa410w.gif
fa410s.gif
2 cross sectional pattern by pixel image zvrcroa.f
3 cross sectional pattern by velocity vectors zvrvela.f
4 3-dimensional pixel image with multi-planes zvrmpxa.f fa410xyz.wrl
fa410yz.wrl
fa410xyz.gif
fa410yz.gif

5-b. Quarter volume model of earth's magnetosphere

No. Contents Fortran Main Program VRML file gif file

Subroutine Package zvrsubb.f

1 3-dimensional magnetic field lines zvrmagb.f fb240w.wrl
fbq240w.wrl
fb240w.gif
fb240s.gif
fbq240w.gif
fbq240s.gif
2 cross sectional pattern by pixel image zvrcrob.f
zvrcrobq.f
3 cross sectional pattern by velocity vectors zvrvelb.f
zvrvelbq.f
4 3-dimensional pixel image with multi-planes zvrmpxb.f fb240xyz.wrl
fb240yz.wrl
fb240xyz.gif
fb240yz.gif

5-c. Half volume model of earth's magnetosphere with dipole tilt

No. Contents Fortran Main Program VRML file gif file

Subroutine Package zvrsubc.f

1 3-dimensional magnetic field lines zvrmagc.f fc360w.wrl fc360w.gif
fc360s.gif
2 cross sectional pattern by pixel image zvrcroc.f
3 cross sectional pattern by velocity vectors zvrvelc.f
4 3-dimensional pixel image with multi-planes zvrmpxc.f fc360xyz.wrl
fc360yz.wrl
fc360xyz.gif
fc360yz.gif

5-d. Whole volume model of earth's magnetosphere

No. Contents Fortran Main Program VRML file gif file

Subroutine Package zvrsubd.f

1 3-dimensional magnetic field lines zvrmagd.f fde180w.wrl fde180w.gif
fde180s.gif
2 cross sectional pattern by pixel image zvrcrod.f
3 cross sectional pattern by velocity vectors zvrveld.f
4 3-dimensional pixel image with multi-planes zvrmpxd.f fde180xyz.wrl
fde180yz.wrl
fde180xyz.gif
fde180yz.gif

6.Application of VRML to 3-dimensional MHD Models of Earth's Magnetosphere

6-a. 3-dimensional visualization of earth’s magnetosphere with multiple planes

No. Contents Fortran Main Program VRML file gif file

Subroutine Package zvrsubd.f

1 3-dimensional magnetic field lines zvrmagd.f zvrmagdc2.idd1i540.wrl zvrmagdc2.idd1i540.gif
2 Plasma velocity vectors in cross section zvrveld.f zvrveldc.idd1i540.wrl zvrveldc.idd1i540.gif
3 Pixel image of plasma temperate with multiple planes zvrmpxdc5.f .pxd4.idd1i540.wrl pxd4.idd1i540.gif
4 Synthesis image with multiple planes in three directions
pxd4mdc2v.idd1i540.wrl pxd4mdc2v.idd1i540.gif

  

6-b. 3-dimensional visualization of earth’s magnetosphere with equivalence planes

No. Contents Fortran Main Program Subroutine Program VRNL file
1 3-dimensional magnetic field lines zvrmagd.f zvrsubd.f zvrmagdc2.idd1n720.wrl
2 Plasma velocity vectors in cross section zvrveld.f zvrsubd.f zvrveldc.idd1n720.wrl
3 3-dimensional visualization with equivalence planes mcubvrm.f mcubsub.f mcub.idd1n720.wrl
4 Synthesis image with multiple planes in three directions

mcubdc2v.idd1n720.wrl

  

6-c. Cropping of 3-dimensional data

No. Contents Fortran Main Program Subroutine Program VRNL file
1 cropping of 3-dimensional data mbikxyz.f