[pstricks] specifying angles by direction vectors

John Frampton jframpto at lynx.dac.neu.edu
Thu Nov 25 18:11:29 CET 2004


PSTricksters,

Often, in using \nccurve I would like to specify the direction of
the curve at the endpoints by giving direction vectors, not by
giving angles.  I have not found a way to do this.  What I plan
to do is to try to define a new macro \nccurvedirs so that I can
say things like:

\nccurvedirs[dirA=(1,1),ncurvA=1.4,dirB=(-2,-1)]{A}{B}

Two new parameters need to be defined, but that is trivial.

A more refined version might introduce a third parameter, so that
I can say things like:

\psset{dirs=true}
\nccurve[dirA=(1,1),ncurvA=.5,dirB=(-2,-1),ncurvB=1.4]{A}{B}

This would require redefining \nccurve so that it uses either
direction vectors or angles, depending on the setting of the
dirs parameter.

This posting is not a request for someone (i.e. Herbert) to write
the code for me.  I think with some study of the pstricks code
and the Blue Book I will be able to accomplish that.  What I am
interested in is whether or not I am correct in concluding that
there is no way to do this without defining some new macros using
raw ps code and, secondarily, whether my general plan of attack
makes sense.

Thanks,
John Frampton

-

... people don't want to go to war... But, after all, it's the
leaders of the country who determine the policy and it's always a
simple matter to drag the people along whether it's a democracy
or a parliament or a communist dictatorship... Voice or no voice,
the people can always be brought to the bidding of the leaders.
That is easy.  All you have to do is tell them they are being
attacked and denounce the pacifists for lack of patriotism and
exposing the country to greater danger.  It works the same way
in any country.
                     Hermann Goering, at his Nuremberg trial





More information about the PSTricks mailing list