primitiveSphere operation

Synopsis

  • primitiveSphere ()
  • primitiveSphere (sides, divisions)
  • primitiveSphere (sides, divisions, radius)

Parameters

  1. sidesinteger
    Number of subdivisions along latitude of the sphere. There must be at least 3 sides. The default value is 16.
  2. divisionsinteger
    Number of subdivisions along longitude of the sphere. There must be at least 3 sides. The default value is 16.
  3. radiusfloat
    Radius 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 dimensions are 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.

Lot-->
   primitiveSphere()
   texture("builtin:uvtest.png")
Sphere with 16 sides

The inserted sphere has 8 sides, 4 divisions, a radius of 10 and is positioned in the xz center.

Lot-->
   primitiveSphere(8,4,10)
   texture("builtin:uvtest.png")
Sphere with 8 sides on xz center

In this topic