# Sphere

Sphere

## Constructor

#### new Sphere(center, radius)

Initializes a new sphere given center point and radius.
##### Parameters:
Name Type Description
`center` Array.<x, y, z> A center point.
`radius` double A radius value.

### Members

#### center :Array.<x, y, z>

Gets or sets the center point of the sphere.
##### Type:
• Array.<x, y, z>

#### diameter :double

Gets or sets the diameter for this sphere.
• double

#### isValid :bool

Gets a value that indicates whether the sphere is valid.
• bool

#### northPole :Array.<x, y, z>

Gets the point at the North Pole of the sphere. This is the parameterization singularity that can be obtained, at V value +Math.Pi/2.
##### Type:
• Array.<x, y, z>

#### radius :double

Gets or sets the Radius for this sphere.
• double

#### southPole :Array.<x, y, z>

Gets the point at the South Pole of the sphere. This is the parameterization singularity that can be obtained, at V value -Math.Pi/2.
##### Type:
• Array.<x, y, z>

### Methods

...

#### closestPoint(testPoint) → {Array.<x, y, z>}

Returns point on sphere that is closest to given point.
##### Parameters:
Name Type Description
`testPoint` Array.<x, y, z> Point to project onto Sphere.
##### Returns:
Point on sphere surface closest to testPoint.
Type
Array.<x, y, z>

...

#### latitudeDegrees(degrees) → {Circle}

Computes the parallel at a specific latitude angle. The angle is specified in degrees.
##### Parameters:
Name Type Description
`degrees` double An angle in degrees for the meridian.
A circle.
Type
Circle

#### latitudeRadians(radians) → {Circle}

Computes the parallel at a specific latitude angle. The angle is specified in radians.
##### Parameters:
Name Type Description
`radians` double An angle in radians for the parallel.
A circle.
Type
Circle

#### longitudeRadians(radians) → {Circle}

Computes the meridian at a specific longitude angle. The angle is specified in radians.
##### Parameters:
Name Type Description
`radians` double An angle in radians.
A circle.
Type
Circle

...

#### normalAt(longitudeRadians, latitudeRadians) → {Array.<x, y, z>}

Computes the normal at a specific angular location on the sphere.
##### Parameters:
Name Type Description
`longitudeRadians` double A number within the interval [0, 2pi].
`latitudeRadians` double A number within the interval [-pi/2, pi/2].
A vector.
Type
Array.<x, y, z>

#### pointAt(longitudeRadians, latitudeRadians) → {Array.<x, y, z>}

Evaluates the sphere at specific longitude and latitude angles.
##### Parameters:
Name Type Description
`longitudeRadians` double A number within the interval [0, 2pi].
`latitudeRadians` double A number within the interval [-pi/2,pi/2].
A point value.
Type
Array.<x, y, z>

#### toBrep()

Converts this sphere is it Brep representation

...

#### toNurbsSurface() → {NurbsSurface}

Converts this sphere to its NurbsSurface representation. This is synonymous with calling NurbsSurface.CreateFromSphere().
##### Returns:
A nurbs surface representation of this sphere or null.
Type
NurbsSurface