#VRML V2.0 utf8 #
# ex-lightpoint.wrl # Example : point lights # Defining and rendering a sphere using a directional light # Observer in (0,0,6) looking at (0,0,1) Viewpoint { position 0 0 6 orientation 0 0 1 0 } #a PointLight means a light source that sends rays equally in # all directions #ambientIntensity, varies 0 - 1 defining an additional ambient contribution #attenuation a b c, defines an attenuation factor #color r g b , each component in the range 0-1 defining the light color #intensity 1, range 0-1 #location x y z #on boolean, lit (TRUE) or unlit light #radius n, zone of light influence (n is the zone radius) #example : no-ambient,color=white,intensity .5,location x=2,lit,radius=20 # Comparing to the directional light we can concentrate the effect by # approximating the light and the geometry (like here) # Comparing to the spot, here the light is more scattered PointLight{ ambientIntensity 0 attenuation 1 0 0 color 1 1 1 # white intensity .2 location 0 0 2 on TRUE radius 20 } # the sphere is defined green (specular) and located at (0,0,0) # defines a Shape Node and a surface material Shape{ appearance Appearance { material Material { ambientIntensity 0.2 # default diffuseColor .4 .4 .4 #in order to see the sphere shininess .5 # sharp specularColor .0 .5 0 } } geometry Sphere{} } #