I would like to add "dots/points" to each grid intersection in the torus below.
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{colormaps}
\pgfplotsset{
compat=newest
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[view={120}{30},
axis equal image,
hide axis,
z buffer = sort,
scale = 1.5
]
\addplot3[
surf,
samples = 20,
samples y = 40,
domain = 0:2*pi,
domain y = 0:2*pi,
](
{(1+sin(deg(\x)))*cos(deg(\y))},
{(1+sin(deg(\x)))*sin(deg(\y))},
{cos(deg(\x))}
);
\end{axis}
\end{tikzpicture}
\end{document}
I tried to add something like this to my code above:
\addplot3 coordinates (
{(1+sin(deg(\x)))*cos(deg(\y))},
{(1+sin(deg(\x)))*sin(deg(\y))},
{cos(deg(\x))}
);
but this causes my code to freeze. What should I do?