1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| clc
clear all
close all
L=2.25; % mm (radius of the lens)
R=10; % mm (curvature of the lens)
h=sqrt(R^2-L^2);
thmax=asin(L/R); % angle par rapport à la verticale
n=1;
P_donnees= zeros(100,1); % là je crée mon vecteur p_donnee mais je sais % pas cmt le remplir des valeurs de p de chaque itération
for th=0:.4/R:thmax
r=R*sin(th);
N=round(2*pi*r/.4);
for p=0:2*pi/N:2*pi
x(n)=r*cos(p);
y(n)=r*sin(p);
z(n)=R*cos(th)-h;
n=n+1;
P_donnees=p;
end
end
figure(2);
plot3(x,y,z,'o--')
axis equal; rotate3D on
zlim([1e-2 .3]);
xlim([-2.25 2.25]); ylim([-2.25 2.25]) |
Partager