%% syntaxe : [ellipse] ell2pol --> [A A' B B']
/ell2pol {
4 dict begin
aload pop
/ang exch def
/b exch def
/a exch def
/I defpoint
[
I a neg 0 addv
I 0 b neg addv
I a 0 addv
I 0 b addv
]
{I ang rotatepoint} papply
end
} def
%% syntaxe : [A B A' B'] pol2ell --> [ellipse]
/pol2ell {
5 dict begin
aload pop
/B' defpoint
/A' defpoint
/B defpoint
/A defpoint
[
A A' milieu
2 copy /I defpoint
A A' distance 2 div
B B' distance 2 div
A A' angle
]
end
} def
%% syntaxe : ell u translateell --> ell'
/translateell {
2 dict begin
/uy exch def
/ux exch def
ell2pol
{ux uy translatepoint} papply
pol2ell
end
} def
%% syntaxe : ell I alpha rotateell --> ell'
/rotateell {
2 dict begin
/alpha exch def
/I defpoint
ell2pol
{I alpha rotatepoint} papply
pol2ell
end
} def
%% syntaxe : ell I alpha homell --> ell'
/homell {
2 dict begin
/alpha exch def
/I defpoint
ell2pol
{I alpha hompoint} papply
pol2ell
end
} def
%% syntaxe : ell I symell --> ell'
/symell {
1 dict begin
/I defpoint
ell2pol
{I sympoint} papply
pol2ell
end
} def
%% syntaxe : ell D axesymell --> ell'
/axesymell {
1 dict begin
/D defdroite
ell2pol
{D axesympoint} papply
pol2ell
end
} def
|