[page:BufferGeometry] →

# [name]

A class for generating sphere geometries.

## Code Example

```const geometry = new THREE.SphereGeometry( 15, 32, 16 ); const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); const sphere = new THREE.Mesh( geometry, material ); scene.add( sphere ); ```

## Constructor

### [name]([param:Float radius], [param:Integer widthSegments], [param:Integer heightSegments], [param:Float phiStart], [param:Float phiLength], [param:Float thetaStart], [param:Float thetaLength])

widthSegments — number of horizontal segments. Minimum value is 3, and the default is 32.
heightSegments — number of vertical segments. Minimum value is 2, and the default is 16.
phiStart — specify horizontal starting angle. Default is 0.
phiLength — specify horizontal sweep angle size. Default is Math.PI * 2.
thetaStart — specify vertical starting angle. Default is 0.
thetaLength — specify vertical sweep angle size. Default is Math.PI.

The geometry is created by sweeping and calculating vertexes around the Y axis (horizontal sweep) and the Z axis (vertical sweep). Thus, incomplete spheres (akin to 'sphere slices') can be created through the use of different values of phiStart, phiLength, thetaStart and thetaLength, in order to define the points in which we start (or end) calculating those vertices.

## Properties

See the base [page:BufferGeometry] class for common properties.

### [property:Object parameters]

An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.

## Methods

See the base [page:BufferGeometry] class for common methods.
{"ft_lang_label":"__label__en","ft_lang_prob":0.6654723,"math_prob":0.9352114,"size":1430,"snap":"2022-40-2023-06","text_gpt3_token_len":323,"char_repetition_ratio":0.124123424,"word_repetition_ratio":0.048780486,"special_character_ratio":0.22797203,"punctuation_ratio":0.1870229,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9745974,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-03T00:17:53Z\",\"WARC-Record-ID\":\"<urn:uuid:cd082888-302e-4cfa-bb25-1b9c2b79c5e6>\",\"Content-Length\":\"3057\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:61d1d1c1-68cd-47f0-b73b-3f0e05726423>\",\"WARC-Concurrent-To\":\"<urn:uuid:622825bf-eec4-410a-950a-e4dbe8db5d25>\",\"WARC-IP-Address\":\"35.185.44.232\",\"WARC-Target-URI\":\"https://www.crachecode.net/vendor/three.js/docs/api/en/geometries/SphereGeometry.html\",\"WARC-Payload-Digest\":\"sha1:QRAIPYWWU4GWPEXDL27DOZ7KBI2GSAIV\",\"WARC-Block-Digest\":\"sha1:C5KO63TSDIYNSYICENSODKFJCW7UZTPO\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500041.2_warc_CC-MAIN-20230202232251-20230203022251-00165.warc.gz\"}"}