[pstricks] an example for peRelLIne and ...

Patrice MÉGRET Patrice.MEGRET at umons.ac.be
Fri Jul 18 11:30:46 CEST 2014


Dear Herbert,

Here is an example that uses \psRelLine, \psParallelLine, ... with the proposed pstricks-add modification.
The vector diagram is automatically adapted when we change the angle of I2 (second line of picture). It could even be animated by using animate package.

\documentclass{article}
\usepackage{pstricks-add}
\listfiles

\newcommand{\pmsc}[1]{\ensuremath{\underline{#1}}}
\newcommand{\pmIc}{\pmsc{I}}
\newcommand{\pmUc}{\pmsc{U}}
\newcommand{\pmEc}{\pmsc{E}}

\begin{document}
\begin{pspicture}[showgrid=true](-5,-5)(5,8)
\psStartPoint[I](0,0)
\psVector[linewidth=1.5pt,linecolor=red](1.5;235)\ncput*{$\pmIc_2$}%I_2
\psStartPoint[U](0,0)
\psVector[linewidth=1.5pt](2;90)\ncput*{$\pmUc_2$}%U_2
\psParallelLine[linewidth=1.5pt,arrows=->](0,0)(I1)(U1){-0.3}{NUa}\nbput{\tiny $-R_2\pmIc_2$}%-R_2.I_2
\psRelLine[linewidth=1.5pt,arrows=->,angle=90](NUa)(U1){-5}{NUb}\nbput{\tiny $-j\omega L_{\sigma2}\pmIc_2$}%-j\omega I_2
\pcline[linewidth=3.5pt,arrows=->](0,0)(NUb)\naput{$\pmEc_2$}%E_2
\psParallelLine[linewidth=1.5pt,arrows=->,linecolor=blue](0,0)(NUb)(0,0){1.428}{NUc}\nbput[npos=0.8]{$\pmEc_1$}%E_1 (m=0.7)
\psRelLine[linewidth=1.5pt,arrows=->,angle=-85,linecolor=orange](0,0)(NUc){0.2}{NIm1}\nbput{\tiny $\pmIc_{m1}$}%I_m1
\psParallelLine[linewidth=1.5pt,arrows=->,linecolor=orange](0,0)(I1)(NIm1){-0.7}{NI1}\nbput{\tiny $-m\pmIc_2$}%m.I_2
\pcline[linewidth=1.5pt,arrows=->,linecolor=orange](0,0)(NI1)\naput{\tiny $\pmIc_{1}$}%I_1
\psParallelLine[linewidth=1.5pt,arrows=->,linecolor=blue](0,0)(NI1)(NUc){0.2}{NUd}\nbput{\tiny $R_1\pmIc_1$}%R_1 I_1
\psRelLine[linewidth=1.5pt,arrows=->,angle=90,linecolor=blue](NUd)(NUc){-5}{NUe}\nbput{\tiny $j\omega L_{\sigma1}\pmIc_1$}%-j\omega I_2
\pcline[linewidth=1.5pt,arrows=->,linecolor=blue](0,0)(NUe)\naput{$\pmUc_{1}$}%I_1
\end{pspicture}
\end{document}

Best regards,
Patrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20140718/d81f4606/attachment.html>


More information about the PSTricks mailing list