How to use many vertex to create a irregular sphere?

Hi guys, I want to do some visualization based on data accquired by matlab, in general I want to use these 3D position to create a irregular sphere(looks like a cell body), then combine them with dendrites(created already,demo at
My question is, what geometry is suitable to do such thing?

The regular sphere has the 2 poles at top and bottom so the density distribution is kinda weird.

One kind of sphere that I like is the subdivided cube approach…

Instead of 2 poles, it has 8 poles, and less overall distortion…

Looks like this:

Made like this:

  let tmp = new THREE.Vector3()
  let geo = new THREE.BoxGeometry(1,1,1,10,10,10);

  for(let c=geo.attributes.position.count,i=0,p=geo.attributes.position,n=geo.attributes.normal;i<c;i++){
  let m1=new THREE.Mesh(geo,new THREE.MeshStandardMaterial());

(glitch: Glitch :・゚✧ )

it may work, but based on my data I can’t use it. I find another way, PolyhedronGeometry, which need more information, verticesOfCube is what I have, I need an algorithm to find indicesOfFaces

Perhaps: ConvexGeometry three.js docs

you are right.

1 Like