Syntax
- primitiveSphere()
- primitiveSphere(sides, divisions)
- primitiveSphere(sides, divisions, radius)
Parameters
- sides—floatNumber of subdivisions along latitude of the sphere. There must be at least 3 sides. The default value is 16.
- divisions—floatNumber of subdivisions along longitude of the sphere. There must be at least 3 sides. The default value is 16.
- radius—floatRadius of the sphere.
Description
The primitiveSphere operation inserts a sphere geometry into the scope of the current shape.
- If radius isn't given the bounding box coincides with the scope. Zero scope sizes are handled the same way as in the i operation.
- If radius is specified the sphere is positioned in the xz-center of the scope lying on y=0.
The sphere has texture coordinates on the first texture layer (COLORMAP).
Related
Examples
The inserted sphere has 16 sides, 16 divisions and is fit into the current scope. The scope's zero size is modified relative to the average of the two non-zero sizes.
| |
The inserted sphere has 8 sides, 4 divisions, a radius of 10 and is positioned in the xz center.
|