# calculate x,y positions in circle every n degrees

I am having trouble trying to work out how to calculate the $$(x,y)$$ point around a circle for a given distance from the circles center.

Variables I do have are:

constant distance/radius from center ($$r$$) the angle from $$y$$ origin

I basically need a point ($$x$$ and $$y$$) around a circle every $$18$$ degrees.

Excuse me if this is a very basic question but math is not my strong point :/

Ta John

• Do you know polar coordinates ? Feb 14, 2014 at 11:46
• Nope, but I will look it up, cheers for the pointer Feb 14, 2014 at 11:54

## 2 Answers

x = radius *  cos(angle)
y = radius *  sin(angle)


Inverse Y-axis:

x = radius *  sin(angle)
y = radius * -cos(angle)


If radians is used then

radian = angle * 0.0174532925


and

x = radius *  cos(radian)
y = radius *  sin(radian)


Radian is the standard unit of angular measure, any time you see angles, always assume they are using radians unless told otherwise.

• and the stackoverflow, non-zero-centered version of this for anyone who ended up here looking for a computer algorithm: stackoverflow.com/a/839931 - I'd emphasize that angle in this and in the stackoverflow answer is in radians (0...2π), not degrees (0...360) May 18, 2018 at 18:50

I'm assuming you have a calculator.

1. Enter 90; press the "cos" button. If you get "0", your calculator is working in degrees, and you're good to proceed with the rest of these instructions. If not, see if you can find a "D/R" or "DRG" button and press it once; then try again. (This converts the calculator from "Degrees" to "radians". Once you get it saying $\cos(90) = 0$, proceed.

2. for each number $i$ between $0$ and $19$, you're going to do the following. I'll illustrate with $i = 3$, and assuming your radius is 38.

a. Enter i (I enter 3); write down i on a piece of paper

b. Multiply by 18 (I get 54)

c. Press the "cos" button (1 get .8090)

d. multiply by the radius (in my case, 38; I get 22.33) and write down the value

e. Enter i again

f. multiply by 18

g. press the "sin" button

h. multiply by the radius; write down the value.

When you're done, you should have a table that looks like this:

i     x      y
0     38     0
1     36.14  11.74
2     30.74  22.33
...


which contains the coordinates that you need.

• "I'm assuming you have a calculator." lol, everything member of this site has a calculator in some form or fashion. 😉 Jan 1, 2020 at 6:32