blob: 51506cc543d4148470cb15f29c71faafeba8737e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
\documentclass[a4paper]{article} % From Michael Sharpe
\usepackage{pstricks}
\SpecialCoor
\usepackage{pst-plot}
\pagestyle{empty}
\begin{document}
\newcommand\drawseg[2]{%
\pscustom[linecolor=red]{%
\translate(#1,#2)
\rotate{(#2,#1)} % Vector in direction of field at x=#1,y=#2
\psline(-.25,0)(.25,0)}}
\begin{pspicture}(-6,-6)(6,6)
\psset{arrows=->}
\psaxes[linestyle=dashed,linewidth=0.1pt,arrowscale=3](0,0)(-6,-6)(6,6)
\multido{\n=-5+1}{11}{%
\multido{\N=-5+1}{11}{%
\ifnum\N=0
\ifnum\n=0 \else\drawseg{\n}{\N}\fi
\else
\drawseg{\n}{\N}
\fi}}
\end{pspicture}
\end{document}
|