VRML ( オブジェクト )


オブジェクトの種類

Cube
立方体
Cone
コーン
bottomRadius value
底の半径
height value
高さ
Sphere
radius value
半径
Cylinder
シリンダー
radius value
半径
height value
高さ
AsciiText
テキスト
string "text"
表示するテキスト

  1. 以下のデータを適当なエディタで作る。
    #VRML V1.0 ascii
    Separator
    {
    	Transform
    	{
    		translation -3 0 0
    	}
    	Material
    	{
    		diffuseColor 1 0 0
    	}
    	Cube
    	{
    	}
    }
    Separator
    {
    	Transform
    	{
    		translation -1 0 0
    	}
    	Material
    	{
    		diffuseColor 0 1 0
    	}
    	Cone
    	{
    		bottomRadius 1
    		height 2
    	}
    }
    Separator
    {
    	Transform
    	{
    		translation 1 0 0
    	}
    	Material
    	{
    		diffuseColor 0 0 1
    	}
    	Sphere
    	{
    		radius 1
    	}
    }
    Separator
    {
    	Transform
    	{
    		translation 3 0 0
    	}
    	Material
    	{
    		diffuseColor 1 0 1
    	}
    	Cylinder
    	{
    		radius 1
    		height 2
    	}
    }
    Separator
    {
    	Transform
    	{
    		translation 5 0 0
    	}
    	Material
    	{
    		diffuseColor 1 1 0
    	}
    	AsciiText
    	{
    		string "TEST"
    	}
    }
    

    これを objs.wrl というファイル名でセーブする。
  2. VRML のビューワで表示する。
    例えば VRWeb を使うのなら、
    # vrweb objs.wrl