Question Pstricks

Denis Girou Denis.Girou at idris.fr
Thu Feb 18 19:24:40 CET 1999


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

>>>>> "Christophe.Jorssen" == Stofkri  <Stofkri at aol.com> writes:

    Christophe.Jorssen> Je vous ai écrit il ya quelque temps à propos d'une question PSTRICKS mais
    Christophe.Jorssen> vous ne m'avez pas répondu. Peut-être que le message s'est égaré ou que vous
    Christophe.Jorssen> n'avez pas eu le temps de vous penchez sur le problème. Mais je me permet de
    Christophe.Jorssen> solliciter de nouveau votre aide :

  For public domain softwares, everybody using them know that often we can
access also to a fast, competent and free support. But this is the case for
softwares with a large base and many competent people able to answer to
difficult questions, and for softwares with one or very few specialists but
also few users.

  The current situation of PSTricks is not very well balanced: too many users,
not enough specialists... Obviously, PSTricks has nothing related with my job
(I only use it for some of my documents as everybody here) and all my personal
free time will be never enough to solve the problems received from everywhere,
so there is already some time that I stop to answer to everybody, outside the
fact that I even don't found time to continue my own projects.

  I was outside for two weeks, and if I will probably study some of the
questions asked during this period, I'll not been able to answer to all the
PSTricks/Seminar/FancyVrb questions sent personally to me or to the various
newsgroups during this time.

  If you want to increase your chance to got an answer about PSTricks, use the
mailing list, even if only few people have a detailed knowledge of the various
aspects of a rather huge and complex package like PSTricks, and if ever less
few ones know the internals.

    Christophe.Jorssen> Voilà, j'aimerais savoir s'il est possible, avec pstricks, de créer une
    Christophe.Jorssen> commande à la "\psarc" mais s'appliquant à une ellipse.
    Christophe.Jorssen> Ainsi, on pourrait dessiner une ellipse partielle en définissant son grand
    Christophe.Jorssen> axe,
    Christophe.Jorssen> son petit axe, son centre, l'angle de départ et l'angle d'arrivée.

  The documentation show clearly that this doesn't exist. Obviously, it must
be possible, as with PostScript programming we can do a lot of things, but a
clean and complete implementation of a macro of the style of \psarc is not
trivial and a real work (that I don't plan to do).

  A "quick and dirty" solution consist to extend the actual \psellipse macro
to allow partial ellipse drawings. It is easy to do, but you will not have the 
full capabilities: no arrows, no "showpoints" parameter...

\documentclass{article}

\usepackage{pstricks}

\makeatletter

% Arc of ellipse (but without arrows and "showpoints" parameter...)
% D.G. - Feb. 18, 1999
\def\psarcellipse{\pst at object{psarcellipse}}
\def\psarcellipse at i(#1){\@ifnextchar(%
{\psarcellipse at ii(#1)}{\psarcellipse at ii(0,0)(#1)}}
\def\psarcellipse at ii(#1)(#2)#3#4{%
\psarcellipse at iii(#1)(#2){#3}{#4}}
\def\psarcellipse at iii(#1)(#2)#3#4{%
\begin at ClosedObj
\pst at getcoor{#1}\pst at tempa
\pst@@getcoor{#2}%
\addto at pscode{%
%0 360
#3 #4
\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}%
\def\pst at linetype{0}%
\showpointsfalse
\end at ClosedObj}

\makeatother

\pagestyle{empty}

\begin{document}

\psset{subgriddiv=0}

\begin{pspicture}(5,5)\psgrid
  \psellipse(1.5,1)(1.5,1)
  \psarcellipse[linewidth=0.1](2,3)(1.5,1){0}{180}
  \psarcellipse[linecolor=red,linestyle=dotted](4,2)(0.5,1){30}{220}
\end{pspicture}
\hfill
\begin{pspicture}(5,5)\psgrid
  \psarc[linewidth=0.1,arrowscale=2]{<->}(1.5,1){1.5}{0}{180}
  \psarc[showpoints=true](2,3){1}{30}{120}
\end{pspicture}

\end{document}

    Christophe.Jorssen> Si vous ne pouvez pas me répondre, indiquez moi comment on se sert de la
    Christophe.Jorssen> mailing list Pstricks car je ne comprends pas comment ça fonctionne.

    Christophe.Jorssen> Merci d'avance.

    Christophe.Jorssen> Christophe JORSSEN

  As somebody tell you yesterday in the french newsgroup, the Web interface is 
on: http://www.tug.org/cgi-bin/lwgate/pstricks
It is supposed to be self-explained and auto-sufficient...

  P.S. During the tests I made this evening on ellipses, I found an
incorrection: when "showpoints" is active, the call to \psellipse generate
a fatal PostScript error. In fact, "showpoints" must be inactivated for
\psellipse as it is the case for \pscircle, for instance. I'll include the
trivial patch one day.

\def\psellipse at ii(#1)(#2){%
\begin at ClosedObj
\pst at getcoor{#1}\pst at tempa
\pst@@getcoor{#2}%
\addto at pscode{%
0 360
\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}%
% D.G. modification begin - Feb. 18, 1999
\showpointsfalse
% D.G. modification end
\end at ClosedObj}

D.G.

-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------



More information about the PSTricks mailing list