%% PhS
%%
40 setxunit
-6 7 setxrange
-8 6 setyrange
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% procédures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/dtA {
2 dict begin %% Ax Ay
/Ay exch def
/Ax exch def
1 Ax Ay norme div arctan
end
} def
/alpha_A {
4 dict begin %% Th Ax Ay
/Ay exch def
/Ax exch def
/Th exch def
/Th0 Ax Ax Ay norme div arccos
Ay 0 le {-1 mul} if
def
Th Th0 sub
Ax Ay dtA abs div
1 min -1 max 90 mul
end
} def
/U_alpha {
1 dict begin %% alpha
/alpha exch def
alpha cos alpha sin
end
} def
/V_A {
5 dict begin %% Th Ax Ay
/Ay exch def
/Ax exch def
/Th exch def
/Th0 Ax Ax Ay norme div arccos
Ay 0 le {-1 mul} if
def
/al_Th Th Ax Ay alpha_A def
al_Th Th0 add U_alpha
Rayon Ax Ay norme sub 0 max
al_Th cos dup mul mul mulv
end
} def
/M_Th {
1 dict begin %% Th
/Th exch def
Th cos Rayon mul
Th sin Rayon 0.7 mul mul
Th 1 1 V_A addv
Th -0.5 -1 V_A addv
Th 0 -2 V_A addv
Th -2.5 2 V_A addv
Th 3 5 V_A addv
Th 2.8 -3 V_A addv
end
} def
/M_Th_x {
1 dict begin %% Th
/Th exch def
Th M_Th pop
end
} def
/M_Th_y {
1 dict begin %% Th
/Th exch def
Th M_Th exch pop
end
} def
/Grad_M {
2 dict begin %% Th long
/long exch def
/Th exch def
Th M_Th Th 0.1 add M_Th vecteur
0.1 1 exch div mulv
%% dupp norme long exch div mulv
10 mulv
exch -1 mul
end
} def
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% definition d'une couleur
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/coul1 {120 255 div 70 255 div 9 255 div setrgbcolor} def
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% tracés
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1.3 setlinewidth
/arrowscale {1.3 dup} def
continu
0 0 point
coul1
-180 185 settrange
500 setresolution
1 1 5 {
coul1
/Rayon exch def
{M_Th_x} {M_Th_y} courbeparam
orange
-180 20 160 {
1 dict begin
/a exch def
[a M_Th dupp a 1 Grad_M addv] ( ->) ligne
end
} for
} for
-180 20 160 {
1 dict begin
/a exch def
[a M_Th dupp a 1 Grad_M addv] ( ->) ligne
end
} for
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% texte
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|