[pstricks] \psarc & \pswedge of ellipses

Eddie Saudrais eddie.saudrais at wanadoo.fr
Mon Jun 2 17:10:33 CEST 2003


Grzegorz Owsiany a écrit :
> 
> Is there a simple solution? i don't need arrows.

I had to draw such an object in a document. I didn't success
in writing quickly a new command which accepts the two
angles as arguments, so I created a command psellip that fit
to my need. Well... it's a quick and dirty method: it's OK
if you have only one or two arc of an ellipse to draw, but I
am interrested in a general command.


\def\psellip{\pst at object{psellip}}
\def\psellip at i(#1){\@ifnextchar(%
{\psellip at ii(#1)}{\psellip at ii(0,0)(#1)}}
\def\psellip at ii(#1)(#2){%
\begin at ClosedObj
\pst at getcoor{#1}\pst at tempa
\pst@@getcoor{#2}%
\addto at pscode{%
-90 90 %%%%%%%%%%------>>>> Modify those value (begin and
end angles)
\pst at coor
\ifdim\psk at dimen\p@=\z@\else
\psk at dimen CLW mul
dup 4 -1 roll sub neg 3 1 roll sub
\fi
\pst at tempa
\tx at Ellipse
}%closepath}%
\def\pst at linetype{2}%
\end at ClosedObj}

*********************************************
*             Ma page maison :              *
*   http://perso.wanadoo.fr/eddie.saudrais  *
*********************************************



More information about the PSTricks mailing list