Webots Reference Manual

previous page go up next page

Thanks

1. Introduction

2. Node Chart

3. Nodes and API Functions

4. Motion Functions

5. Prototypes

6. Physics Plugin

7. Fast2D Plugin

8. MTN Functions

9. Webots World Files

10. Other APIs

     

3.34 PointLight

Derived from Light.

PointLight {
  SFVec3f   attenuation   1 0 0    # [0,inf)
  SFVec3f   location      0 0 0    # (-inf,inf)
  SFFloat   radius        100      # [0,inf)
}

3.34.1 Description

The PointLight node specifies a point light source at a 3D location in the local coordinate system. A point light source emits light equally in all directions. It is possible to put a PointLight on board a mobile robot to have the light move with the robot.

A PointLight node's illumination drops off with distance as specified by three attenuation coefficients. The final attenuation factor is calculated as follows: att = 1/(attenuation[0] + attenuation[1] * r + attenuation[2] * r2), where r is the distance from the light to the surface being illuminated. The default is no attenuation. When PointLight nodes are used together with LightSensors it is recommended to change the default attenuation to a more realistic [0 0 4*pi] in order to more accurately model physical reality. Indeed, if a point source radiates light uniformly in all directions and there is no absorption, then the irradiance drops off in proportion to the square of the distance from the surface.

previous page go up next page
^ page top ^

  E-mail to webmaster Last updated: Copyright © 2010 Cyberbotics Ltd.