BufferGeometry

TorusKnotGeometry

Creates a torus knot, the particular shape of which is defined by a pair of coprime integers, p and q. If p and q are not coprime, the result will be a torus link.

Code Example

const geometry = new v3d.TorusKnotGeometry(10, 3, 100, 16); const material = new v3d.MeshBasicMaterial({ color: 0xffff00 }); const torusKnot = new v3d.Mesh(geometry, material); scene.add(torusKnot);

Constructor

TorusKnotGeometry(radius : Float, tube : Float, tubularSegments : Integer, radialSegments : Integer, p : Integer, q : Integer)

Properties

See the base BufferGeometry class for common properties.

.parameters : Object

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

Methods

See the base BufferGeometry class for common methods.

Source

For more info on how to obtain the source code of this module see this page.