1

I want to draw the circuit in this picture.

enter image description here

I've started with this one:

\begin{circuitikz}
\draw (0,0) to[short,-] ++(6,0) coordinate(a) node[above=0.1cm]{A}
    to[R, l=\mbox{$R_3$}, i>=$I_3$, *-*] ++(0,-6) coordinate(b) node[below=0.1cm]{B}
    to[short,-] ++(-6,0);

.....
.....
.....

\end{circuitikz}

How should I do to add only the parts red marked (e.g. R1, R2, R4 and R5 resistors and so on); they must be at the same height, equal size and symmetrical to R3 resistors (aka, y axis).

2

You can start, for example, with the following example. The trick is to draw the resistor not between A and B, but from the intermediate horizontal level. A bit of math solves the rest (notice that the math here is for different angles than the one marked in the OP diagram).

I did just one side and manually --- you can clearly use a \foreach loop, but to understand the concept is better to start like this, I think. The other side is left to the reader...

\documentclass[]{article}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{circuitikz}[american]
    % define the gap
    \def\gap{2}
    \draw (0,0) to[short,-] ++(6,0) coordinate(a) node[above=0.1cm]{A}
    % let's mark the heigh h and on the top
    to[short, i=$I_3$] ++(0,-\gap) coordinate(a3)
    to[R, l=\mbox{$R_3$}, *-*] ++(0,-2)
    % and the bottom one
    coordinate(b3)
    to[short] ++(0,-\gap)
    coordinate(b) node[below=0.1cm]{B}
    to[short,-] ++(-6,0);
    % there is surely a more elegant way, but...
    \path (a) ++({-\gap*tan(30)},-\gap) coordinate(a2);
    \draw [color=red] (a) to[short, i_=$I_2$] (a2)
    to[R, l_=$R_2$] (a2|-b3) coordinate(b2)
    to[short] (b);
    \path (a) ++({-\gap*tan(60)},-\gap) coordinate(a1);
    \draw [color=red] (a) to[short, i_=$I_1$] (a1)
    to[R, l_=$R_1$] (a1|-b3) coordinate(b1)
    to[short] (b);
    \draw [ultra thick, line cap=round] (a2) -- (a1) -- ++(-1,0);
    \draw [ultra thick, line cap=round] (b2) -- (b1) -- ++(-1,0);
\end{circuitikz}
\end{document}

enter image description here

1
  • [RESOLVED] It is a smart solution which has ultimately led to an excellent result! Thank you, indeed! – mikilinux Mar 4 at 21:53

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.