# Why this ellipsoid is a bit skewed

Why is this ellipsoid a bit skewed and why are there black stripes on it?

``````import graph3;
import three;
size(0,200);
currentprojection=perspective(2,0,0.85);
real a=2;
real b=2;
real c=1.7;
triple f(pair z){
return (a*sin(z.x)*cos(z.y),b*sin(z.x)*sin(z.y),c
*cos(z.x));
}
surface s=surface(f,(0,-pi/2),(2*pi,pi/2),Spline);
draw(s,lightred);
draw(O--2.5X,L=Label("\$x\$",EndPoint,WSW));
draw(O--2.3Y,L=Label("\$y\$",EndPoint,ESE));
draw(O--2.2Z,L=Label("\$z\$",EndPoint,N));
``````

• The resolution of parametric surfaces can be increased by ajusting `nu` and `nv` parameters, see section 4.4 of Asymptote tutorial. Default value is 10, to make ellipsoid smoother add `nu=50` as surface parameter. Commented Feb 22, 2023 at 13:43
• The ranges of parameters should be corrected in the following way: `surface s=surface(f,(0,0),(pi,2*pi),nu=50,Spline);`. Commented Feb 22, 2023 at 14:38
• @AndreyL. you did solve the problem extremely well. Commented Feb 22, 2023 at 16:57
• even with `nu=50`, I still see a pale line on the sphere Commented Feb 25, 2023 at 17:36