A simple and quick example for Carol
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,shapes.geometric,calc,backgrounds}
\begin{document}
\begin{tikzpicture}
\matrix (gamea) [matrix of nodes,nodes={circle,draw},row sep=5mm,column sep=5mm]{
& 1 &\\
2& |[draw=none]|3 & 4\\
|[draw=none]| 5 & 6 & |[draw=none]|7\\
& |[draw=none]|8 &\\
};
\draw ($(gamea-3-1)!0.5!(gamea-4-2)$) ellipse [x radius=1.2cm, y radius=0.30cm,rotate=-45];
\draw ($(gamea-2-2)!0.5!(gamea-3-3)$) ellipse [x radius=1.2cm, y radius=0.30cm,rotate=-45];
\begin{scope}[on background layer]
\fill[black!20,rounded corners] ([xshift=-2mm]gamea-2-3.west) arc (180:0:5mm and 5mm) --
([xshift=1mm]gamea-3-3.east) arc (0:-90:1cm and 1.5cm) arc
(-90:-180:1cm and 0.8cm) |- ([shift={(3mm,2mm)}]gamea-3-2.north east) -- cycle;
\end{scope}
\end{tikzpicture}
\end{document}
The main problem was that step was too small to be recognized by the intersections
library (some ideas are written in the comment section). We also needed to correct a coefficient of 1.1
to get arrowheads back on the curve. The presented layout is in a way similar to this one, http://i.stack.imgur.com/mcmob.png.
%! *latex mal-helicoid.tex
\documentclass[a4paper]{article}
\pagestyle{empty}
\usepackage{tikz}
\usetikzlibrary{intersections}
\pagecolor{white}
\begin{document}
\tikzset{malstyle/.style={->,>=stealth, line width=0.2pt},
malarrow/.style={->, >=stealth}}
\begin{tikzpicture}
% The curve drawing and filling...
\draw [name path=Ewave] [red, thick, ->, fill, fill opacity=0.2] (0,0,0) -- plot [domain=0:12.5664, samples=100] ({sin(\x r)}, {cos(\x r)}, \x) -- (0,0,12.5664) --cycle;
%\fill [red, fill opacity=0.2] (0,0,0) -- plot [domain=0:12.5664, samples=100] ({sin(\x r)},{cos(\x r)},\x) -- (0,0,12.5664) -- cycle;
% Adding all kind of arrows...
\foreach [ evaluate={\xpos=sin(\zpos*180/pi); \ypos=cos(\zpos*180/pi);} ]
\zpos in {0, 0.2618, ..., 12.5664}
{% Beginning of \foreach...
\draw[malstyle, black] (0,0,\zpos) -- (\xpos, \ypos, \zpos);
\draw[malstyle, black!40] (0,0,0) -- (\xpos, \ypos, 0);
\draw[malstyle, green] (0,0,\zpos) -- (\xpos, 0, \zpos);
\draw[malstyle, blue] (0,0,\zpos) -- (0, \ypos, \zpos);
}% End of \foreach...
% Drawing the axis... (positive and negative values)
% positive
\draw [malarrow] (0,0,0) -- (0,0,14.5) node[xshift=5, yshift=15] {$z$};
\draw [malarrow] (0,0,0) -- (0,2,0) node[xshift=-5, yshift=-10] {$y$};
\draw [malarrow] (0,0,0) -- (2,0,0) node[xshift=-10, yshift=-5] {$x$};
% negative
\draw[dashed] (0,0,0)--(-2,0,0) (0,0,0)--(0,-2,0) (0,0,0)--(0,0,-4);
\end{tikzpicture}
\end{document}
Best Answer
You also can use
pgfplots
for this.Code
Update
If you want a 2cm separation on grid, one thing you can do is to use
ytick
andxtick
options, as follows: