TorusKnotGeometry 环面纽结

—> Geometry

环面纽结就像一根管子绕它自己旋转了几圈. 对 p 和 q 进行不同的设置, 就可看到各种各样不同的图形. https://en.wikipedia.org/wiki/Torus_knot

function TorusKnotGeometry( radius, tube, tubularSegments, radialSegments, p, q ) { } var geometry = new THREE.TorusKnotGeometry(3, 0.6, 80, 10), material = new THREE.MeshBasicMaterial({color: 0x663399, side: THREE.DoubleSide}), torusKnot = new THREE.Mesh( geometry, material ); scene.add( torusKnot );

Parameters

radius tube tubularSegments radialSegments p q
1 0.4 64 8 2 3
半径 管半径 圆环的圆周分段数 管的圆周分段数 绕轴旋转的次数 绕其内部旋转的次数

Methods 继承自 Geometry 并自动调用

fromBufferGeometry( new TorusKnotBufferGeometry( radius, tube, tubularSegments, radialSegments, p, q ) )
mergeVertices( )

TorusKnotBufferGeometry

function TorusKnotBufferGeometry( radius, tube, tubularSegments, radialSegments, p, q ) { } var geometry = new THREE.TorusKnotBufferGeometry(3, 0.6, 80, 10), material = new THREE.MeshBasicMaterial({color: 0x663399, side: THREE.DoubleSide}), torusKnot = new THREE.Mesh( geometry, material ); scene.add( torusKnot );

Methods 继承自 BufferGeometry 并自动调用

setIndex( )
addAttribute( )

图解API

纹理Texture来渲染环面纽结模型. 点开查看