0

Image/Description of what I am trying to do

As I have tried to demonstrate in the above image, I am trying to find Cartesian coordinates along a circles edge.

I have a heading angle in radians from the center of the circle and I have the magnitude of a vector point outwards along that angle that I can set to any length. Call this simply R as radius of the circle. I also have the center point of the circle as J.

Using this information, how could I find the Cartesian coordinates for any given angle, any given J, and any given R so that I could draw a line from point (x, y) eg = (0, 0) to the coordinates.

Thanks heaps for the help.

Gerry Myerson
  • 179,216
  • In the special case $J=0$, do you know how to do it? – Arthur Sep 24 '19 at 06:10
  • @Arthur at J = 0, the Cartesian point should; I assume, be (-x, -y) or (-x, y) I still want to calculate this as no, I do not know how to do this. I'm effectively just actually trying to find the point on the circle. The line is there just to clearly demonstrate what I am trying to calculate – Aquaphor Sep 24 '19 at 06:13
  • Let's say, also for simplicity, that $(x_1,y_1)=(0,0)$. What are the coordinates of a point on a circle centered at the origin? You have an angle, you have a radius. Draw it, see if you can spot something. – Arthur Sep 24 '19 at 06:15
  • @Arthur to clarify, the lines I am drawing above are more to show that I want to find the points along a circle. I just need those points. Not so much the line. I want to use these points to set a velocity vector of a given object in a program I am writing. This is maybe a clearer idea of what I am trying to find: https://imgur.com/a/uV1OSAM – Aquaphor Sep 24 '19 at 06:22

1 Answers1

1

This turned out easier than I was making it out to be, and I'll probably get down voted alot for posting a somewhat stupid question, but for any others who have this question. I found the answer:

(x, y) that you want to find along a circles edge is equal to =

x = circleCenterX + radius * cos(angleInRadians)

y = circleCenterY + radius * sin(angleInRadians)