3

Along the lines of this question, I would like to know if there is a way to automate tick drawing along a curve generated by psbezier in PSTricks (and potentially pspolygon and more complex curves encapsulated in pscustom). What I would like to achieve is something like this:

line with arrows

where the curve has been generated by psbezier. (Here, the arrows have been drawn, placed and oriented manually to fit the shape of the curve — very time-consuming.)

2

For example:

\documentclass{article}
\usepackage{pstricks-add}
\begin{document}

\begin{pspicture}(-1,-1)(10,4)
\psparametricplot[algebraic]{0}{9}{t^2/9 | sin(t)+1}%
\pscurvepoints{0}{9}{(t^2)/9 | sin(t)+1}{P}%
% make ticks using arc-length metric
\pspolylineticks[metricInitValue=1,ticksize=-2pt 2pt,Os=1,Ds=.2]{P}{ ds }{1}{56}%
\pspolylineticks[metricInitValue=1,Os=1,Ds=2]{P}{ ds }{0}{6}%
\multido{\iA=1+1,\iB=3+2}{5}{\Put{6pt;(PNormal\iA)}(PTick\iA){\tiny \iB}}
\end{pspicture}

\begin{pspicture}(5,3) \psset{arrowscale=1.5}
\psbezier[ArrowInsideNo=9,ArrowInside=->]{*->}(0,0)(1,3)(3,0)(5,3)
\end{pspicture}

\psset{unit=0.75cm} 
\begin{pspicture}(-3,-5)(15,5)
\psbezier[ArrowInsideNo=19, ArrowInside=-|,  
    showpoints=true]{->}(-3,0)(5,-5)(8,5)(15,-5)
\end{pspicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.