VRML : Chemistry in VRML
Source code for example 2 : A nucleus with electron cloud.


#VRML V1.0 ascii

Separator {

#Setup Lights, Camera and Material as before.

	DirectionalLight { direction 0 0 -1 }
	DirectionalLight { direction 0 -1 0 }
	PerspectiveCamera { position 0 0 6 }
	Material {
		diffuseColor 1 0 0
		ambientColor 0.2 0 0
	}

#Create a small solid sphere; the nucleus

	Sphere { radius 0.2 }

#Make the current Material a different colour and transparent

	Material {
		diffuseColor 0 0 1
		transparency 0.8
	}

#Create a large semi-transparent sphere; the electron cloud

	Sphere { radius 2.0 }
}


#End of file




Previous Topic (Chemistry in VRML)
Back to the VRML Reference
Back to the Main Page

©Tom Thurston, 1997
Please feel free to use and redistribute this NONcommercially!