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

     

3.39 Sphere

Sphere { 
  SFFloat   radius        1   # (0,inf)
  SFInt32   subdivision   1   # [0,inf)
}

The Sphere node specifies a sphere centered at (0,0,0) in the local coordinate system. The radius field specifies the radius of the sphere and must be greater than zero (see figure 3.20). The Sphere node's geometry requires outside faces only. When viewed from the inside, the results are undefined. The Sphere node cannot be textured.

sphere

Figure 3.20: Sphere node

The VRML97 Sphere node was extended to include a subdivision field which controls the shape of the rendered sphere. Spheres are rendered as icosaedrons with 20 faces when the subdivision field is set to 0. If the subdivision field is 1 (default value), then each face is subdivided into 4 faces, making 80 faces. With a subdivision field set to 2, 320 faces will be rendered, making the sphere very smooth. A maximum value of 5 (corresponding to 20480 faces) is allowed for this subdivision field to avoid a very long rendering process. A value of 10 will turn the sphere appearance into a black and white soccer ball.

previous page go up next page
^ page top ^

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