PasDeT=0.01;
a=1;
b=.5;
c=sqrt(2);
d=0;
A=btennis(a,b,c,d,PasDeT);
% persp(A,pi/6,pi/6,100,100)
% r=a+b;
% t=0:.1:2*pi+.1;
% x=r*cos(t);
% y=r*sin(t);
% hold on
% plot(x,y)
% axis('square')

r=a+b;
n = 20;
theta = (-n:2:n)/n*pi;
phi = (-n:2:n)'/n*pi/2;
cosphi = cos(phi); cosphi(1) = 0; cosphi(n+1) = 0;
sintheta = sin(theta); sintheta(1) = 0; sintheta(n+1) = 0;

x = r*cosphi*cos(theta);
y = r*cosphi*sintheta;
z = r*sin(phi)*ones(1,n+1);
% surf(x,y,z)

[x,y,z]=sphere(36);
surf(r*x,r*y,r*z)
lightpos = [-2 .5 3];
fac = 36;
amst = [0 .7 1.2];
spst = .85;
facecol = 'y';
set(gca,'dataaspectratio',[1 1 1],'vis','off','AmbientLightColor','y')
h9 = findobj(gca,'type','surface');
set(h9,'FaceColor',facecol,'Facelighting','phong','EdgeColor','none',...
    'SpecularStrength',spst,'AmbientStrength',amst(3))
light('Position',lightpos);


hold on
plot3(A(1,:),A(2,:),A(3,:),'w','LineWidth',6)
axis equal
hold off

rotate3d on
