# Sectors of a Circle

I am programatically drawing sectors of a circle with radius 55 on a cartesian plane which runs from -55 to 55 on the x and y axes. I would like the first sector to be drawn at 0,55.

I know I can calculate the x,y values using using:

Further, I know that I can multiply x * -1 to go in a clockwise fashion around with the remnaing sectors.

This works great however, the first sector is positioned at -55,0 on the plane.

How do I adjust these caculations so that the first sector starts at 0, 55 and subsequent sectors go around in a clockwise fashion from this point?

-
Negate $y$ instead of $x$. – Daniel Fischer Jul 3 '13 at 15:26
@DanielFischer if I negate y, then I can start my first sector at 55,0 in a clockwise fashion. What do I have to do to start the first sector at 0, 55 – Art Jul 3 '13 at 15:43
Ah, sorry, I didn't pay attention and thought you wanted to start at $(55,0)$. To start at $(0,55)$, swap $\sin$ and $\cos$, $x = r\cdot \sin \varphi$ and $y = r\cdot \cos \varphi$ for clockwise, negate $x$ for anti-clockwise. – Daniel Fischer Jul 3 '13 at 15:45
@DanielFischer Please post this as an answer so I can assign you credit! Thank you so much! – Art Jul 3 '13 at 15:55

If the center of the area is supposed to be $(0, 0)$ and the array is 111 by 111 (2 x 55+1), when you compute $x$ and $y$, you have to be careful when you map those into your plotting area.
For example, usually $x$ goes left-to-right and $y$ goes bottom-to-top, but your array to be displayed may have its $y$ going top-to-bottom.