TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to draw a circle using tkz-euclide and n segments of this circle. Since I want to have n as a basic variable I need to divide in the following example. However it doesn't work, any ideas?


\tkzDrawCircle[R](O,1 cm)
\foreach \i in {0,(360:\sectors),...,360}{


share|improve this question
up vote 2 down vote accepted

I would write it in the following way (using the (angle:radius) syntax for polar coordinates).


\tkzDrawCircle[R](O,1 cm)
\foreach \i in {1,2,...,\sectors} {

Using P\i as the node name ensures that the points have different names, so that you can access them later on (giving all the same name would work for just this picture, because names just get overwritten).

Alternatively, you can set the point with


There is one inconsistency to be aware of: Standard TikZ/PGF trigonometric functions take degrees. If you use them in tkz commands, they take radians. And polar coordinates are always specified in degrees, even in tkz.

share|improve this answer

Your Answer


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.