Reputation: 21
Three.js only have functions that draw ellipses,but I want to draw the ellipsoid, please help me!
I want to draw the ellipsoid using three.js
Upvotes: 1
Views: 836
Reputation: 210968
You can construct an ellipsoid by scaling a sphere:
const ellipsoidGeometry = new THREE.SphereGeometry(0.5, 32, 16);
ellipsoidGeometry.rotateZ(Math.PI/2);
ellipsoidGeometry.scale(2, 1, 1);
const ellipsoidMesh = new THREE.Mesh(ellipsoidGeometry, yourMaterial);
Upvotes: 2