Graphics, Figures & TablesPSTricks | Make multiple regular bends in a straight line

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

PSTricks | Make multiple regular bends in a straight line

Post by niles »

Hi

I have the following generated for me in PSTricks:

Code: Select all

\documentclass{article}
\usepackage{pstricks, pst-node, pst-plot, pst-circ}
\usepackage{moredefs}
\usepackage[%
    paperwidth = 10.08871cm,
    paperheight= 5.0827586cm,
    lmargin    = 5mm,
    rmargin    = 0mm,
    tmargin    = 0mm,
    bmargin    = 0mm,
    ]{geometry}
\begin{document}


\providelength{\plotwidth}           \setlength{\plotwidth}{10cm}% width of the axes only
\providelength{\LineWidth}           \setlength{\LineWidth}{1.2pt}%
\newrgbcolor{GridColor}{0.6 0.6 0.65}%

\psset{xunit=0.020000\plotwidth,yunit=0.000500\plotwidth}%
\begin{pspicture}(-16.336406,-574.712644)(40.921659,432.781609)%

\psline[linewidth=\LineWidth,linecolor=GridColor]{->}(21.0,400)(29.0,-150)

\end{pspicture}%

\end{document}
I want the line to have many arcs spaced regularly, such that it behaves like a harmonic function. Is there an easy way to do this, or do I have to type in each arc manually?

Best,
Niles.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply