/usegeomD {} def
/o {0 0 0} def
/Defpoint {defcercle} def
%% syntaxe : A A' Vecteur
/Vecteur {
6 dict begin
/z' exch def
/y' exch def
/x' exch def
/z exch def
/y exch def
/x exch def
x' x sub
y' y sub
z' z sub
end
} def
%% syntaxe u v Addv --> u+v
/Addv {
6 dict begin
/z' exch def
/y' exch def
/x' exch def
/z exch def
/y exch def
/x exch def
x' x add
y' y add
z' z add
end
} def
%% syntaxe : v alpha Mulv --> alpha u
/Mulv {
4 dict begin
/alpha exch def
/z exch def
/y exch def
/x exch def
alpha x mul
alpha y mul
alpha z mul
end
} def
%% syntaxe : v Norme --> |u|
/Norme {
3 dict begin
/z exch def
/y exch def
/x exch def
x dup mul
y dup mul add
z dup mul add
sqrt
end
} def
/Milieu {
6 dict begin
/z' exch def
/y' exch def
/x' exch def
/z exch def
/y exch def
/x exch def
x' x add 2 div
y' y add 2 div
z' z add 2 div
end
} def
/angle_I -135 def
/angle_J -5 def
/coeff_vect_I 1 def
/coeff_vect_J 1 def
/vect_I {angle_I cos angle_I sin coeff_vect_I mulv} def
/vect_J {angle_J cos angle_J sin coeff_vect_J mulv} def
/vect_K {0 1} def
/xyz2xy {
3 dict begin
/z exch def
/y exch def
/x exch def
vect_I x mulv
vect_J y mulv
vect_K z mulv
addv addv
end
} def
/projxy {
pop 0
} def
/projxz {
3 dict begin
/z exch def
/y exch def
/x exch def
x 0 z
end
} def
/projyz {
3 dict begin
/z exch def
/y exch def
/x exch def
0 y z
end
} def
/projOy {
3 dict begin
/z exch def
/y exch def
/x exch def
0 y 0
end
} def
/projOx {
3 dict begin
/z exch def
/y exch def
/x exch def
x 0 0
end
} def
/projOz {
3 dict begin
/z exch def
/y exch def
/x exch def
0 0 z
end
} def
/Xtick {
1 dict begin
/x exch def
[x -.1 0 x .1 0] {xyz2xy} capply ligne
end
} def
/Ytick {
1 dict begin
/y exch def
[-.1 y 0 .1 y 0] {xyz2xy} capply ligne
end
} def
/Ztick {
1 dict begin
/z exch def
[0 -.1 z 0 .1 z] {xyz2xy} capply ligne
end
} def
/arrowscale {.5 dup} def
/OXarrow {
gsave
IM stranslate
O I angle rotate
arrow
grestore
} def
/OYarrow {
gsave
JM stranslate
O J angle rotate
arrow
grestore
} def
/OZarrow {
gsave
KM stranslate
O K angle rotate
arrow
grestore
} def
/Xmark {
gsave
1 dict begin
/t exch def
t Xtick
setCourrier
t ch cvs t 0 0 xyz2xy (-2 1) bltext
end
grestore
} def
/Ymark {
gsave
1 dict begin
/t exch def
t Ytick
setCourrier
t ch cvs 0 t 0 xyz2xy urtext
end
grestore
} def
/Zmark {
gsave
1 dict begin
/t exch def
t Ztick
setCourrier
t ch cvs 0 0 t xyz2xy (-2 0) bltext
end
grestore
} def
/largeur_repere 5 def
/Longueur_repere 10 def
/Tracerepere1 {
18 dict begin
gsave
/i {1 0 0} def
/j {0 1 0} def
/k {0 0 1} def
/a {-1 -1 0} def
/b {-1 Longueur_repere 0} def
/c {largeur_repere Longueur_repere 0} def
/d {largeur_repere -1 0} def
[/I /J /K /A /B /C /D]
[i j k a b c d] {xyz2xy} capply
mapnp
O I A B interdroite O 1.2 hompoint /Im defpoint
O I C D interdroite O 1.2 hompoint /IM defpoint
O J A D interdroite O 1.2 hompoint /Jm defpoint
O J C B interdroite O 1.1 hompoint /JM defpoint
/KM {0 ymax} def
-2 O K ydpoint /Km defpoint
2 setlinewidth
[B C D] ligne
.8 setlinewidth
[B A D] ligne
1 setlinewidth
[Im IM] ligne
[Jm JM] ligne
[O KM] ligne
OXarrow
OYarrow
OZarrow
.8 setlinewidth
gsave
pointilles
[Km O] ligne
grestore
[1]
dup {Xtick} apply
{Xmark} apply
[1]
dup {Ytick} apply
{Ymark} apply
[1]
dup {Ztick} apply
{Zmark} apply
setTimesItalic
(x) IM (5 0) brtext
(y) JM (0 -2) dltext
(z) KM drtext
grestore
end
} def
|