Source PostScript (pointsurAB.pps)

Retour Texte non formaté
%% /pointsurAB? { %% 3 dict begin %% /B defpoint %% /A defpoint %% /M defpoint %% %% AM et AB colineaires ? %% A M vecteur A B vecteur colineaires? %% %% xM entre xA et xB ? %% M pop A pop sub M pop B pop sub mul 0 le and %% %% yM entre yA et yB ? %% M exch pop A exch pop sub M exch pop B exch pop sub mul 0 le and %% {true} %% {false} %% ifelse %% end %% } def /pointsurAB? { 3 dict begin /B defpoint /A defpoint /M defpoint %% AM et AB colineaires ? A M vecteur A B vecteur colineaires? %% xM entre xA et xB ? M pop A pop sub M pop B pop sub mul 0 le and %% yM entre yA et yB ? M exch pop A exch pop sub M exch pop B exch pop sub mul 2e-3 le and {true} {false} ifelse end } def