0

I have a list of coordinates defined in a loop. For every coordinate, I would like to draw two circles just off the coordinate. So if my chosen coordinate were A = (x0,y0), it would look like this:

\draw[fill] ({x0-.1*cos(30)}, {y0-.1*sin(30)} ) circle[radius=.1cm]

\draw[fill] ({x0+.1*cos(30)}, {y0+.1*sin(30)} ) circle[radius=.1cm]

But I don't know how to access x0 or y0 (i.e. in python I would write A[0] and A[1]). Hope it makes sense.

1 Answers1

0

Your question is very light on details (and in particular a MWE), so I must assume that this is what you mean:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  \coordinate (A) at (1,2);
  \draw[fill] (A) ++({-.1*cos(30)},{-.1*sin(30)}) circle[radius=.1cm];
  \draw[fill] (A) ++({+.1*cos(30)},{+.1*sin(30)}) circle[radius=.1cm];
\end{tikzpicture}
\end{document}
Henri Menke
  • 109,596