Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need to draw the picture above with tikz's code, and i would know the better way for placing the "zig-zag" lines. Also I would like to put the arrow's tip in the middle of the connection line. Someone could help me? Thanks.

enter image description here


This is a diffrent picture but whith the same problems:

\documentclass{article}
\usepackage{tikz} 
\usetikzlibrary{positioning,
intersections,
shapes.geometric,
decorations.pathmorphing,
decorations.pathreplacing,
decorations.shapes,
decorations.markings,
patterns,
calc,
fit,
arrows,
backgrounds,
matrix}

\begin{document} 
\begin{tikzpicture}[auto]

\tikzset{deco/.style={decoration={
            markings, 
            mark=at position #1 with {\arrow{>} }
            },
        postaction={decorate}},
   trape/.style={trapezium,draw,shape border rotate=90,minimum width=2cm},
   box/.style={rectangle,draw,minimum height=1cm,minimum width=2.5cm},
   cerchi/.style={circle,draw,minimum size=1cm}
}

\matrix [row sep={1.5cm}] {
    &[2cm]  \node [box] (genera) {}; &[2cm]     &[1cm] \\
\node [cerchi] (pompa) {}; &     & \node [trape] (turbina) {};  & \node [cerchi] (ultiliz) {}; \\
 & \node [cerchi] (condensa) {};  & & \\ 
};

\begin{scope}[>=triangle 60]  
\draw [deco=0.6]  (genera) -|  node[pos=0.6]{2} (turbina.top right corner);
\draw [deco=0.6]  (turbina.bottom left corner) |-   node[above=1mm,pos=0.71]{3} (condensa);
\draw [deco=0.4]  (condensa) -|  node[above=1mm,pos=0.31]{4} (pompa);
\draw [deco=0.6]  (pompa) |-   node[below=1mm,pos=0.63]{1} (genera); 
\end{scope}

\draw [->,>=latex,very thick, shorten >=4 pt,shorten <=4pt] (pompa.south)--(pompa.north);

\node [coordinate] (B) at ($ (condensa.center)!.6!(condensa.west) $) {};
\node [coordinate] (C) at ($ (condensa.center)!.6!(condensa.east) $) {}; 
\node [coordinate] (A) at ($ (B)+(0,-1.5cm)$) {}; 
\node [coordinate] (D) at ($ (C)+(0,-1.5cm)$) {}; 
\draw (A)--(B); \draw[decorate,decoration={zigzag,amplitude=3pt,segment length=8pt}] (B)--(C); \draw (C)--(D); 
\end{tikzpicture}
\end{document}

enter image description here

share|improve this question
    
It's perhaps a good idea to define your two circuit symbols as new symbols with the tikz circuit library (see tikz manual). What do you mean exactly by "the better way"? –  student May 5 '12 at 13:52
    
I could define shape using absolute coordinate and drawing lines trough that nodes...but I tkink that there is a better way to do that. I'will try to define new symbols with circuit library. –  Angelo May 5 '12 at 14:14
    
Please post a MWE that shows what you have done so far. For drawing lines in the middle of a line, have a look at this queastion –  Tom Bombadil May 5 '12 at 14:56
    
@student: Tags are based on the question, not on solutions. –  Caramdir May 5 '12 at 19:43
    
@Caramdir I interpreted Angelo's comment "I'will try to define new symbols with circuit library." that he wants to use tikz-circuit library for this. Because of this I added the tag. –  student May 5 '12 at 20:12
add comment

1 Answer

Here is a very simple construction of the circled resistor:

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC,decorations.markings}
\begin{document}
\begin{tikzpicture}
\node[anchor=west,shape=var resistor IEC,minimum width=1cm,draw,outer sep=0] (heater){};
\node[draw,circle,minimum size=3cm] (heater frame) at (heater.center) {};
\draw (-0.5cm,-2cm) |- (heater.west) (heater.east) -| (1.5cm,-2cm);
\draw[-latex,ultra thick,red] (heater frame.west) -- ++(-2cm,0);
\draw[latex-,ultra thick,blue] (heater frame.east) -- ++(2cm,0);
\end{tikzpicture}
\end{document}

enter image description here

If you combine this with the answer regarding the arrows with nodes then you get the essential parts to create the figure.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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