# How to draw Flowchart Summing junction using tikz

How to draw following symbol using tikz?

And why isn't there a standard package which will have all necessary and commonly used shapes in flowcharts. Even existing flowchart package has very less inventory of shapes.

• Welcome to TeX.SX! If you think that LaTeX is missing vital functionality then please write a package for it! :) – Andrew Dec 24 '17 at 8:30
• Ha ha ha ... OK ;-) – charles bell Dec 24 '17 at 8:44
• Apparently, there is no such agreement on necessary and commonly used shapes for flowcharts. – Heiko Oberdiek Dec 24 '17 at 8:46
• Isn't that a multiplication junction? en.wikipedia.org/wiki/Frequency_mixer – endolith Jan 10 '19 at 17:04

For a flow chart a node style might be useful:

\documentclass{article}
\usepackage{tikz}
\definecolor{FlowChartBlue}{rgb}{.3,.5,.75}
\tikzset{
summing junction/.style={
circle,
draw=FlowChartBlue!50!black,
fill=FlowChartBlue,
minimum size=2cm,
path picture={
\draw [FlowChartBlue!50!black]
(path picture bounding box.135) -- (path picture bounding box.315)
(path picture bounding box.45) -- (path picture bounding box.225);
}
}
}
\begin{document}
\begin{tikzpicture}
\node [summing junction] (a) at (0,0) {};
\node [summing junction] (b) at (4,2) {};

\draw [-latex] (a) to[bend left] (b);
\end{tikzpicture}
\end{document}


# Just drawing

Another version, following comment. The clue here is that the + indicates that the coordinate is relative to the previous coordinate ((2,2) in the example).

I don't see how this is better than the above version though, as drawing lines to the circle is more complicated.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
+(45:1cm) -- +(225:1cm)
+(135:1cm) -- +(315:1cm);

+(45:1cm) -- +(225:1cm)
+(135:1cm) -- +(315:1cm);
\end{tikzpicture}
\end{document}


# Ellipses

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\tikzset{
summing junction ellipse/.style={
ellipse,
draw=blue!50!black,
fill=blue!50,
minimum width=3cm,
minimum height=1.5cm,
path picture={
\draw [blue!50!black]
(path picture bounding box.135) -- (path picture bounding box.315)
(path picture bounding box.45) -- (path picture bounding box.225);
}
}
}
\begin{document}
\begin{tikzpicture}
+(45:2cm and 1cm) -- +(225:2cm and 1cm)
+(135:2cm and 1cm) -- +(315:2cm and 1cm);

+(60:2cm and 1cm) -- +(240:2cm and 1cm)
+(120:2cm and 1cm) -- +(300:2cm and 1cm);

\node [summing junction ellipse,fill=green!50] at (8,1) {};
\end{tikzpicture}
\end{document}

• can it be done without using \tikzset like in native syntax where we draw a circle first and then 'X' using lines. \draw (2cm,2cm) circle (2cm); and after this code to draw lines.  – charles bell Dec 24 '17 at 9:26
• @charlesbell Yes (see update), but I don't see why you would do that. – Torbjørn T. Dec 24 '17 at 9:47
• I am having little problem while applying same thing with ellipse, is there any thing I can use in place of radius dimension i.e. 1cm, that will automatically limit length till the arc of ellipse. – charles bell Dec 24 '17 at 12:27
• @charlesbell You can specify major and minor axis in polar coordinates, as mentioned in the manual (cf. Heiko's comment on his answer), e.g. (45:2cm and 1cm). See answer. – Torbjørn T. Dec 24 '17 at 13:08
• Awesome! Thanks. Unfortunately I don't have enough reputation to upvote :-( – charles bell Dec 24 '17 at 13:12

The symbol can be easily drawn in TikZ using polar coordinates:

\documentclass{standalone}
\usepackage{tikz}
\definecolor{FlowChartBlue}{rgb}{.3,.5,.75}
\begin{document}
\begin{tikzpicture}
\filldraw[fill=FlowChartBlue]
;
\end{tikzpicture}
\end{document}


• @charlesbell See the documentation of TikZ: "13.2.1 Canvas, XYZ, and Polar Coordinate Systems". – Heiko Oberdiek Dec 24 '17 at 8:50

Not too difficult to draw with MetaPost either, for whom it may interest. Here the code is included in a LuaLaTeX program.

For sophisticated flowcharts with MetaPost, I've heard about the Metaflow package, but it's not on CTAN and I have not tried it yet.

\documentclass[border=3mm]{standalone}
\usepackage{luatex85,luamplib}
\begin{document}
\begin{mplibcode}
beginfig(1);