I have a geodesic sphere - which was created using THREE.OctahedronGeometry
- I would like to group triangular faces into hexagonal faces, so they can be selected. I'm at a loss about how to approach this problem or if it's even feasible. Any insight would be appreciated.
Here's an example:
createGeodesicSphere =->
geometry = new THREE.OctahedronGeometry(200, 3)
material = new THREE.MeshBasicMaterial({
color : 0xFFFFFF,
shading : THREE.FlatShading,
side : THREE.DoubleSide,
vertexColors : THREE.FaceColors,
overdraw : true
})
# Explode geometry so each face has unique vertices
explodeModifier = new THREE.ExplodeModifier()
explodeModifier.modify(geometry)
geodesicMesh = new THREE.Mesh(geometry , material)
geodesicFaces = geometry.faces
for i in [0..geodesicFaces.length-1]
geodesicFaces[i].color.setRGB(Math.random(), Math.random(), Math.random())
geodesicMesh.position.x = 0
geodesicMesh.position.y = 0
geodesicMesh.position.z = 0
scene.add(geodesicMesh)
最有可能的是不可能,但是您可以尝试一个非常接近六边形的voronoi图: Java 7的球形Voronoi镶嵌:需要修复在面周围缠绕顶点的问题 。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.