自前の図形


#VRML V1.0 ascii

Separator {

	DirectionalLight { 
		direction 0 -1 -1 
		intensity 0.1
	}

	Material {
		ambientColor 0.8 0.8 0.8
		diffuseColor 0.8 0.8 0.8
		specularColor 0.01 0.01 0.01 
		emissiveColor 0.01 0.01 0.01
		shininess 0.01
		transparency 0
	} 

	SpinGroup {
		rotation 0 1 0 .03
		local FALSE

		DEF Kon_nyaku Separator {
			Translation { translation 0 3 0 }

			DEF Kon_nyakuCoords Coordinate3 {
				point [
					0 0.5 0.2,           #0
					0 0.5 -0.2,          #1
					0.5 0 0.2,           #2
					0.5 0 -0.2,          #3
					-0.5 0 0.2,          #4
					-0.5 0 -0.2,         #5
				]
			}# Kon_nyakuCoords 

			IndexedFaceSet {
				coordIndex [
					0, 2, 3, 1, -1,
					0, 4, 2, -1,
					0, 1, 5, 4, -1,
					1, 3, 5, -1,
					2, 4, 5, 3, -1,
				]
			} # IndexedFaceSet
		} #Kon_nyaku Separator

		DEF Ganmo Separator {

			Material {
				ambientColor 0.91 0.69 0.690
				diffuseColor 0.91 0.69 0.690
				emissiveColor 0.01 0.01 0.01
				specularColor 0.05 0.05 0.05 
				shininess 0.01
			} #Material

			Translation { translation 0 2.65 0 }

				Sphere { radius 0.3 }
		} #Ganmo

		DEF Chikuwa Separator {

			Material {
				ambientColor 0.91 0.91 0.835
				diffuseColor 0.910 0.910 0.0835
				emissiveColor 0.01 0.01 0.01
				specularColor 0.05 0.05 0.05 
				shininess 0.01
			} #Material

			Translation { translation 0 2.1 0 }

			Rotation {rotation 1 1 0 3.14}

			Cylinder {
				parts ALL
				height 1.0
				radius 0.2
			} #Cylinder
		} #Chikuwa 

		DEF Kushi Separator {

			Material {
				ambientColor 0.847 0.663 0.478
				diffuseColor 0.847 0.663 0.478
				emissiveColor 0.01 0.01 0.01
				specularColor 0.05 0.05 0.05 
				shininess 0.01
			} #Material

			Translation { translation 0 2.6 0 }
			
			Cylinder {
				parts ALL
				height 2.0
				radius 0.02
			} #Cylinder
		} #Kushi 
	} #SpinGroup
} #Main Separator


解説は今書いてるところです。
戻る 次のサンプルへ メインページ