Doc > Nodes > SOP > Sphere

Doc > Nodes > SOP > Sphere

Creates a sphere.


If the node has no input, you can control the radius and center of the sphere. If the node has an input, it will create a sphere that encompasses the input geometry.


Name Type Description
type integer type of sphere (default sphere or isocahedron)
radius float radius of the sphere when the type is default
resolution vector2 resolution - number of segments in x and y
open boolean if set to 1, you can then set the phiStart, phi_end, thetaStart and theta_end
phiStart float start of phi angle
phiLength float length of phi opening
thetaStart float start of theta angle
thetaLength float length of theta opening
detail integer resolution of the sphere when the type is isocahedron
center vector3 center of the sphere
asLines boolean create lines instead of polygons

Edit code in JsFiddle , Codepen , view in a new tab or Open in the Editor

	// create a scene
const scene = new PolyScene();
const root = scene.root();

// create a sphere
const geo = root.createNode('geo');
const sphere = geo.createNode('sphere');

// add a light

// create a camera
const perspectiveCamera1 = root.createNode('perspectiveCamera');
perspectiveCamera1.p.t.set([5, 5, 5]);
// add orbitControls
const events1 = perspectiveCamera1.createNode('eventsNetwork');
const orbitsControls = events1.createNode('cameraOrbitControls');

// mount the viewer
const element = document.getElementById('app');
Is this doc helpful/not helpful? Is there any information you would like that is not available? Don't hesitate to get in touch with any question or feedback, either by email, on Discord or the forum.