[pstricks] \psellipse

Michael J. Sharpe msharpe at euclid.ucsd.edu
Tue Jan 16 23:34:48 CET 2001

At 9:12 PM +0000 1/16/01, Chris Sangwin wrote:
>Can one draw part of an ellipse easily, something of a cross between
>\psellipse and \psarc?
>I'm doing awful things with white \psframes at the moment.  There must be
>something better?
>Thanks in advance.
>pstricks mailing list
>pstricks at tug.org

There isn't a native Postscript equivalent of psarc, but you could 
achieve the effect in one of two ways:

(i) Use \pscustom to translate to the center of the ellipse, rotate 
so that the new x axis is one of the axes of the ellipse, and scale 
the (rotated) axes to get the eccentricity correct, then draw using 
\psarc. For example

\input pstricks
{Piece of an ellipse.}
\scale{1.6 1}

(ii) Give a parametric form of your ellipse to \parametricplot. One 
simple parametric specification of a general ellipse with center 
(x0,y0) is (for suitably chosen semi-major axes a, b, and rotation 
angle c)

x=x0+a cos t cos c -b sin t sin c,
y=y0+ b cos t sin  c +b sin t cos c

from which you may easily specify the Postscript code needed.

Michael Sharpe

More information about the PSTricks mailing list